Page MenuHomePhabricator

Some PHPUnit tests failing locally
Closed, InvalidPublic

Description

Some of the PHPUnit tests are failing locally.

When running the following inside the VM:

sudo -u www-data php5 /vagrant/mediawiki/tests/phpunit/phpunit.php /vagrant/mediawiki/extensions/Flow/tests/phpunit

I get the below output. I'm not sure if this is related to the PHPUnit version discrepancy (locally MWV has PHPUnit 4.6.2), or what.

1vagrant@mediawiki-vagrant:~$ sudo -u www-data php5 /vagrant/mediawiki/tests/phpunit/phpunit.php /vagrant/mediawiki/extensions/Flow/tests/phpunit
2PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 in Unknown on line 0
3PHPUnit 4.6.2 by Sebastian Bergmann and contributors.
4
5Configuration read from /vagrant/mediawiki/tests/phpunit/suite.xml
6
7Deprecated configuration setting "strict" used
8
9..........................................S..........S......... 63 / 472 ( 13%)
10.S............................................................. 126 / 472 ( 26%)
11...........SS.....SSSS......................................... 189 / 472 ( 40%)
12...................................................EF.......... 252 / 472 ( 53%)
13............................................................... 315 / 472 ( 66%)
14............................................................... 378 / 472 ( 80%)
15....................................EEEEEEEEEEEE............... 441 / 472 ( 93%)
16...............................
17
18Time: 3.9 minutes, Memory: 99.75Mb
19
20There were 13 errors:
21
221) Flow\Tests\NotifiedUsersTest::testWatchingTopic
23Flow\Import\ImportException: No active thread!
24
25/vagrant/mediawiki/extensions/Flow/includes/Import/Postprocessor/LqtNotifications.php:89
26/vagrant/mediawiki/extensions/Flow/includes/Import/Postprocessor/LqtNotifications.php:76
27/vagrant/mediawiki/extensions/Echo/controller/NotificationController.php:273
28/vagrant/mediawiki/extensions/Echo/controller/NotificationController.php:290
29/vagrant/mediawiki/extensions/Echo/controller/NotificationController.php:79
30/vagrant/mediawiki/extensions/Echo/model/Event.php:146
31/vagrant/mediawiki/extensions/Flow/includes/Notifications/Controller.php:151
32/vagrant/mediawiki/extensions/Flow/tests/phpunit/Notifications/NotifiedUsersTest.php:42
33/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
34
352) Flow\Tests\UrlGeneratorTest::testBoardLink with data set #0 (Title Object (...), 'updated', true)
36PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
37
38/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:55
39/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
40
413) Flow\Tests\UrlGeneratorTest::testBoardLink with data set #1 (Title Object (...), 'updated', false)
42PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
43
44/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:55
45/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
46
474) Flow\Tests\UrlGeneratorTest::testBoardLink with data set #2 (Title Object (...), 'created', true)
48PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
49
50/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:55
51/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
52
535) Flow\Tests\UrlGeneratorTest::testBoardLink with data set #3 (Title Object (...), 'created', false)
54PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
55
56/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:55
57/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
58
596) Flow\Tests\UrlGeneratorTest::testWatchTopicLink with data set #0 (Title Object (...), Flow\Model\UUID Object (...))
60PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
61
62/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:96
63/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
64
657) Flow\Tests\UrlGeneratorTest::testWatchTopicLink with data set #1 (Title Object (...), Flow\Model\UUID Object (...))
66PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
67
68/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:96
69/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
70
718) Flow\Tests\UrlGeneratorTest::testWatchTopicLink with data set #2 (Title Object (...), Flow\Model\UUID Object (...))
72PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
73
74/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:96
75/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
76
779) Flow\Tests\UrlGeneratorTest::testWatchTopicLink with data set #3 (Title Object (...), Flow\Model\UUID Object (...))
78PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
79
80/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:96
81/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
82
8310) Flow\Tests\UrlGeneratorTest::testUnwatchTopicLink with data set #0 (Title Object (...), Flow\Model\UUID Object (...))
84PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
85
86/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:110
87/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
88
8911) Flow\Tests\UrlGeneratorTest::testUnwatchTopicLink with data set #1 (Title Object (...), Flow\Model\UUID Object (...))
90PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
91
92/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:110
93/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
94
9512) Flow\Tests\UrlGeneratorTest::testUnwatchTopicLink with data set #2 (Title Object (...), Flow\Model\UUID Object (...))
96PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
97
98/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:110
99/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
100
10113) Flow\Tests\UrlGeneratorTest::testUnwatchTopicLink with data set #3 (Title Object (...), Flow\Model\UUID Object (...))
102PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::assertArrayHasKey() must be a array or ArrayAccess
103
104/vagrant/mediawiki/extensions/Flow/tests/phpunit/UrlGeneratorTest.php:110
105/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
106
107--
108
109There was 1 failure:
110
1111) Flow\Tests\NotifiedUsersTest::testWatchingBoard
112Failed asserting that an array contains 10.
113
114/vagrant/mediawiki/extensions/Flow/tests/phpunit/Notifications/NotifiedUsersTest.php:79
115/vagrant/mediawiki/extensions/Flow/tests/phpunit/Notifications/NotifiedUsersTest.php:64
116/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
117
118--
119
120There were 9 skipped tests:
121
1221) Flow\Tests\BufferedBagOStuffTest::testMergeFailDelayed
123Unable to fork, can't test merge
124
125/vagrant/mediawiki/extensions/Flow/tests/phpunit/Data/BagOStuff/BufferedBagOStuffTest.php:211
126/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
127
1282) Flow\Tests\LocalBufferedBagOStuffTest::testMergeFailDelayed
129Unable to fork, can't test merge
130
131/vagrant/mediawiki/extensions/Flow/tests/phpunit/Data/BagOStuff/BufferedBagOStuffTest.php:211
132/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
133
1343) Flow\Tests\BufferedCacheTest::testMergeFailDelayed
135Unable to fork, can't test merge
136
137/vagrant/mediawiki/extensions/Flow/tests/phpunit/Data/BagOStuff/BufferedBagOStuffTest.php:211
138/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
139
1404) Flow\Tests\Formatter\FormatterTest::testCheckUserFormatter with data set #0 ('With only a topicId reply sho...t fail', Closure Object (...), 'reply', Flow\Model\UUID Object (...), Flow\Model\UUID Object (...), null)
141CheckUser is not available
142
143/vagrant/mediawiki/extensions/Flow/tests/phpunit/Formatter/FormatterTest.php:53
144/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
145
1465) Flow\Tests\Formatter\FormatterTest::testCheckUserFormatter with data set #1 ('With topicId and postId shoul...t fail', Closure Object (...), 'reply', Flow\Model\UUID Object (...), Flow\Model\UUID Object (...), Flow\Model\UUID Object (...))
147CheckUser is not available
148
149/vagrant/mediawiki/extensions/Flow/tests/phpunit/Formatter/FormatterTest.php:53
150/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
151
1526) Flow\Tests\Handlebars\FlowPostMetaActionsTest::testTimestampEdited with data set #0 ('never been edited', '02:52, 1 October 2014', array(true, 'creator', 'creator', null))
153DomCrawler component is not available.
154
155/vagrant/mediawiki/extensions/Flow/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php:81
156/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
157
1587) Flow\Tests\Handlebars\FlowPostMetaActionsTest::testTimestampEdited with data set #1 ('last edited by post creator', 'Edited 04:21, 9 October 2014', array(false, 'creator', 'creator', 'creator'))
159DomCrawler component is not available.
160
161/vagrant/mediawiki/extensions/Flow/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php:81
162/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
163
1648) Flow\Tests\Handlebars\FlowPostMetaActionsTest::testTimestampEdited with data set #2 ('last edited by other than post creator', 'Edited by author 04:21, 9 October 2014', array(false, 'author', 'creator', 'author'))
165DomCrawler component is not available.
166
167/vagrant/mediawiki/extensions/Flow/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php:81
168/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
169
1709) Flow\Tests\Handlebars\FlowPostMetaActionsTest::testTimestampEdited with data set #3 ('most recent revision not a co...t edit', 'Edited 04:21, 9 October 2014', array(false, 'author', 'creator', 'creator'))
171DomCrawler component is not available.
172
173/vagrant/mediawiki/extensions/Flow/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php:81
174/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:131
175
176FAILURES!
177Tests: 472, Assertions: 1343, Failures: 1, Errors: 13, Skipped: 9.
178Warning: Must specify directory location for XHProf runs. Trying /tmp as default. You can either pass the directory location as an argument to the constructor for XHProfRuns_Default() or set xhprof.output_dir ini param.

Related Objects