Skip to content

No meaningful error when <testsuite> element is missing required name attribute #6249

@rino1

Description

@rino1
+ cat compose.yaml
services:
    test:
        image: php
        volumes:
            - type: bind
              source: .
              target: /app
              read_only: false
        working_dir: /app



+ cat tests/t.php
<?php
class tTest extends PHPUnit\Framework\TestCase {
    function testT(){
        $this->assertNull(null);
    }
}



+ cat t.xml
<phpunit>
    <testsuites>
        <testsuite>
            <directory>tests</directory>
        </testsuite>
    </testsuites>
</phpunit>



+ docker compose run --rm test vendor/bin/phpunit tests/t.php
PHPUnit 10.5.47 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.2

.                                                                   1 / 1 (100%)

Time: 00:00.005, Memory: 6.00 MB

OK (1 test, 1 assertion)

OK

+ docker compose run --rm test vendor/bin/phpunit -c t.xml
PHPUnit 10.5.47 by Sebastian Bergmann and contributors.

assert(!empty($name))

Why?

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions