Skip to content
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

Failing test ForeachTaskTest::testLogMessageWithFileset #887

Closed
maciejlew opened this issue Mar 18, 2018 · 3 comments
Closed

Failing test ForeachTaskTest::testLogMessageWithFileset #887

maciejlew opened this issue Mar 18, 2018 · 3 comments
Milestone

Comments

@maciejlew
Copy link
Contributor

I noticed that ForeachTaskTest::testLogMessageWithFileset is failing. Here you have PHPUnit output:

./bin/phpunit --configuration=test/phpunit.xml test/classes/phing/tasks/system/ForeachTaskTest.php
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.

Runtime: PHP 7.1.15-1 with Xdebug 2.6.0
Configuration: /home/xxx/phing/test/phpunit.xml

...E.... 8 / 8 (100%)

Time: 2.61 seconds, Memory: 22.00MB

There was 1 error:

  1. ForeachTaskTest::testLogMessageWithFileset
    TypeError: Argument 1 passed to Reference::__construct() must be an instance of Project, null given, called in /home/xxx/phing/classes/phing/IntrospectionHelper.php on line 437

/home/xxx/phing/classes/phing/types/Reference.php:36
/home/xxx/phing/classes/phing/IntrospectionHelper.php:437
/home/xxx/phing/classes/phing/UnknownElement.php:134
/home/xxx/phing/classes/phing/UnknownElement.php:76
/home/xxx/phing/classes/phing/Task.php:228
/home/xxx/phing/classes/phing/Target.php:343
/home/xxx/phing/classes/phing/Target.php:373
/home/xxx/phing/classes/phing/Project.php:696
/home/xxx/phing/test/classes/phing/BuildFileTest.php:282
/home/xxx/phing/test/classes/phing/tasks/system/ForeachTaskTest.php:80

ERRORS!
Tests: 8, Assertions: 7, Errors: 1.

@mrook
Copy link
Member

mrook commented Mar 20, 2018

What version of phing? Can't reproduce this locally.

@maciejlew
Copy link
Contributor Author

head of master branch

@maciejlew
Copy link
Contributor Author

This test is failing when you fire it without using phing but directly, compare:

phpunit --configuration=test/phpunit.xml test/classes/phing/tasks/system/ForeachTaskTest.php

phing -Dtest=ForeachTaskTest

thats becouse Phing::$currentProject is not being populated.

@mrook mrook added this to the 3.0.0-alpha2 milestone Mar 23, 2018
siad007 added a commit that referenced this issue Apr 2, 2018
@siad007 siad007 mentioned this issue Apr 2, 2018
@mrook mrook closed this as completed in #902 Apr 4, 2018
mrook pushed a commit that referenced this issue Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants