Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Annotation assertions not detected on Windows #26809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
greg0ire opened this issue Apr 5, 2018 · 7 comments
Closed

Annotation assertions not detected on Windows #26809

greg0ire opened this issue Apr 5, 2018 · 7 comments

Comments

@greg0ire
Copy link
Contributor

greg0ire commented Apr 5, 2018

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 4.0.7

We have an issue on doctrine dbal with an assertion as annotation not being detected and the test being marked as risky on Windows:

This test did not perform any assertions
OK, but incomplete, skipped, or risky tests!

Here is a PR where I tried to isolate the issue as much as possible: doctrine/dbal#3087, leaving only a class and its test.

The test code:

<?php

namespace Doctrine\Tests\DBAL\Schema;

use Doctrine\DBAL\Foo;

class ColumnTest extends \PHPUnit\Framework\TestCase
{
    /**
     * @group legacy
     * @expectedDeprecation Hi
     */
    public function testThatIsGoingToBeRisky() : void
    {
        new Foo();
    }
}

The subsequent appveyor build: https://ci.appveyor.com/project/doctrine/dbal/build/1.0.114/job/3nke06rul3e04598

@nicolas-grekas
Copy link
Member

Fixed by #26800?

@Majkl578
Copy link
Contributor

Majkl578 commented Apr 5, 2018

I don't think so, Doctrine doesn't use simple-phpunit at all, it only registers a listener: https://github.com/doctrine/dbal/blob/master/phpunit.xml.dist#L57

@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 5, 2018

Yeah, not sure how it would relate to this bug anyway, but I can try with dev-master, just to be sure.

@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 5, 2018

Relates to #21828

@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 5, 2018

Just pushed a commit that should make the build failed (I changed the expectedDeprecation message). It doesn't, so the issue is a bit more serious than I thought. I notice that I expressed it poorly, because the title of this issue is still technically correct. To be precise, it's not detected when counting assertions or at all, it simply doesn't seem to be taken into account.

@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 5, 2018

Ah I think the Windows build simply use a different configurations, and I didn't add the listeners, let me check.

@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 5, 2018

Stupid mistake, it works just fine, sorry for bothering you with this.

@greg0ire greg0ire closed this as completed Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants