25
25
use PHPCR \Util \NodeHelper ;
26
26
use PHPCR \Util \PathHelper ;
27
27
use Symfony \Component \Filesystem \Filesystem ;
28
- use Webmozart \Assert \Assert ;
29
28
30
29
/**
31
30
* Features context.
@@ -200,7 +199,7 @@ public function iShouldSeeATableContainingTheFollowingRows(TableNode $table)
200
199
}
201
200
}
202
201
203
- Assert:: greaterThanEq (count ($ expectedRows ), $ foundRows , $ this ->getOutput ());
202
+ \PHPUnit_Framework_Assert:: assertGreaterThanOrEqual (count ($ expectedRows ), $ foundRows , $ this ->getOutput ());
204
203
}
205
204
206
205
/**
@@ -209,7 +208,7 @@ public function iShouldSeeATableContainingTheFollowingRows(TableNode $table)
209
208
public function iShouldSeeTheFollowing (PyStringNode $ string )
210
209
{
211
210
$ output = $ this ->getOutput ();
212
- Assert:: contains ($ string ->getRaw (), $ output );
211
+ \PHPUnit_Framework_Assert:: assertContains ($ string ->getRaw (), $ output );
213
212
}
214
213
215
214
/**
@@ -218,7 +217,7 @@ public function iShouldSeeTheFollowing(PyStringNode $string)
218
217
public function iShouldNotSeeTheFollowing (PyStringNode $ string )
219
218
{
220
219
$ output = $ this ->getOutput ();
221
- Assert:: notContains ($ string ->getRaw (), $ output );
220
+ \PHPUnit_Framework_Assert:: assertNotContains ($ string ->getRaw (), $ output );
222
221
}
223
222
224
223
/**
@@ -249,7 +248,7 @@ public function theCommandShouldNotFail()
249
248
throw new \Exception ('Command failed: ( ' .$ exitCode .') ' .$ this ->getOutput ());
250
249
}
251
250
252
- Assert:: eq (0 , $ exitCode , 'Command exited with code: ' .$ exitCode );
251
+ \PHPUnit_Framework_Assert:: assertEquals (0 , $ exitCode , 'Command exited with code: ' .$ exitCode );
253
252
}
254
253
255
254
/**
@@ -259,7 +258,7 @@ public function theCommandShouldFail()
259
258
{
260
259
$ exitCode = $ this ->applicationTester ->getLastExitCode ();
261
260
262
- Assert:: notEq (0 , $ exitCode , 'Command exited with code ' .$ exitCode );
261
+ \PHPUnit_Framework_Assert:: assertNotEquals (0 , $ exitCode , 'Command exited with code ' .$ exitCode );
263
262
}
264
263
265
264
/**
@@ -270,15 +269,15 @@ public function theCommandShouldFailWithMessage($arg1)
270
269
$ exitCode = $ this ->applicationTester ->getLastExitCode ();
271
270
$ output = $ this ->getOutput ();
272
271
273
- Assert:: eq ($ arg1 , $ output );
272
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg1 , $ output );
274
273
}
275
274
276
275
/**
277
276
* @Given /^the file "([^"]*)" should exist$/
278
277
*/
279
278
public function theFileShouldExist ($ arg1 )
280
279
{
281
- Assert:: true (file_exists ($ this ->getWorkingFilePath ($ arg1 )));
280
+ \PHPUnit_Framework_Assert:: assertTrue (file_exists ($ this ->getWorkingFilePath ($ arg1 )));
282
281
}
283
282
284
283
/**
@@ -305,7 +304,7 @@ public function theFileExists($arg1)
305
304
public function theOutputShouldContain (PyStringNode $ string )
306
305
{
307
306
foreach ($ string ->getStrings () as $ line ) {
308
- Assert:: contains ($ line , $ this ->getOutput ());
307
+ \PHPUnit_Framework_Assert:: assertContains ($ line , $ this ->getOutput ());
309
308
}
310
309
}
311
310
@@ -316,7 +315,7 @@ public function theNodeShouldNotExist($arg1)
316
315
{
317
316
$ session = $ this ->getSession ();
318
317
$ node = $ session ->getNode ($ arg1 );
319
- Assert:: null ($ node );
318
+ \PHPUnit_Framework_Assert:: assertNull ($ node );
320
319
}
321
320
322
321
/**
@@ -327,7 +326,7 @@ public function theXpathCountIsInFile($arg1, $arg2, $arg3)
327
326
$ xpath = $ this ->getXPathForFile ($ arg3 );
328
327
$ res = $ xpath ->query ($ arg1 );
329
328
330
- Assert:: eq ($ arg2 , $ res ->length );
329
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg2 , $ res ->length );
331
330
}
332
331
333
332
/**
@@ -364,7 +363,7 @@ public function iShouldNotBeLoggedIntoTheSession()
364
363
{
365
364
$ this ->executeCommand ('session:info ' );
366
365
$ output = $ this ->getOutput ();
367
- Assert:: regex ('/live .*no/ ' , $ output );
366
+ \PHPUnit_Framework_Assert:: assertRegExp ('/live .*no/ ' , $ output );
368
367
}
369
368
370
369
/**
@@ -428,7 +427,7 @@ public function thereShouldExistANodeAtBefore($arg1, $arg2)
428
427
throw new \Exception ('Could not find child node ' .$ arg1 );
429
428
}
430
429
431
- Assert:: eq ($ arg2 , $ afterNode ->getPath ());
430
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg2 , $ afterNode ->getPath ());
432
431
}
433
432
434
433
/**
@@ -531,7 +530,7 @@ public function thenIShouldBeLoggedInAs($arg1)
531
530
$ session = $ this ->getSession ();
532
531
$ userId = $ session ->getUserID ();
533
532
534
- Assert:: eq ($ userId , $ arg1 );
533
+ \PHPUnit_Framework_Assert:: assertEquals ($ userId , $ arg1 );
535
534
}
536
535
537
536
/**
@@ -691,7 +690,7 @@ public function theCurrentNodeShouldBe($arg1)
691
690
{
692
691
$ this ->executeCommand ('shell:path:show ' );
693
692
$ cnp = $ this ->applicationTester ->getLastLine ();
694
- Assert:: eq ($ arg1 , $ cnp , 'Current path is ' .$ arg1 );
693
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg1 , $ cnp , 'Current path is ' .$ arg1 );
695
694
}
696
695
697
696
/**
@@ -729,7 +728,7 @@ public function thePrimaryTypeOfShouldBe($arg1, $arg2)
729
728
$ session = $ this ->getSession ();
730
729
$ node = $ session ->getNode ($ arg1 );
731
730
$ primaryTypeName = $ node ->getPrimaryNodeType ()->getName ();
732
- Assert:: eq ($ arg2 , $ primaryTypeName , 'Node type of ' .$ arg1 .' is ' .$ arg2 );
731
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg2 , $ primaryTypeName , 'Node type of ' .$ arg1 .' is ' .$ arg2 );
733
732
}
734
733
735
734
/**
@@ -746,7 +745,7 @@ public function theNodeAtShouldHaveThePropertyWithValue($arg1, $arg2, $arg3)
746
745
$ propertyValue = $ propertyValue ->getIdentifier ();
747
746
}
748
747
749
- Assert:: eq ($ arg3 , $ propertyValue );
748
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg3 , $ propertyValue );
750
749
}
751
750
752
751
/**
@@ -762,7 +761,7 @@ public function theNodeAtShouldHaveThePropertyWithValueAtIndex($arg1, $arg2, $ar
762
761
}
763
762
764
763
$ propertyType = $ property ->getValue ();
765
- Assert:: eq ($ arg3 , $ propertyType [$ index ]);
764
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg3 , $ propertyType [$ index ]);
766
765
}
767
766
768
767
/**
@@ -778,7 +777,7 @@ public function thePropertyShouldHaveType($arg1, $arg2)
778
777
));
779
778
}
780
779
781
- Assert:: eq ($ arg2 , PropertyType::nameFromValue ($ property ->getType ()));
780
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg2 , PropertyType::nameFromValue ($ property ->getType ()));
782
781
}
783
782
784
783
/**
@@ -794,8 +793,8 @@ public function thePropertyShouldHaveTypeAndValue($arg1, $arg2, $arg3)
794
793
));
795
794
}
796
795
797
- Assert:: eq ($ arg2 , PropertyType::nameFromValue ($ property ->getType ()));
798
- Assert:: eq ($ arg3 , $ property ->getValue ());
796
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg2 , PropertyType::nameFromValue ($ property ->getType ()));
797
+ \PHPUnit_Framework_Assert:: assertEquals ($ arg3 , $ property ->getValue ());
799
798
}
800
799
801
800
/**
@@ -865,7 +864,7 @@ public function theNodeShouldBeLocked($arg1)
865
864
$ lockManager = $ workspace ->getLockManager ();
866
865
$ isLocked = $ lockManager ->isLocked ($ arg1 );
867
866
868
- Assert:: true ($ isLocked );
867
+ \PHPUnit_Framework_Assert:: assertTrue ($ isLocked );
869
868
}
870
869
871
870
/**
@@ -878,7 +877,7 @@ public function theNodeShouldNotBeLocked($arg1)
878
877
$ lockManager = $ workspace ->getLockManager ();
879
878
$ isLocked = $ lockManager ->isLocked ($ arg1 );
880
879
881
- Assert:: false ($ isLocked );
880
+ \PHPUnit_Framework_Assert:: assertFalse ($ isLocked );
882
881
}
883
882
884
883
/**
0 commit comments