File tree 3 files changed +8
-10
lines changed
src/ScayTrase/SmsDeliveryBundle/Features/Context
3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 17
17
"symfony/config" : " ~2.3|~3.0"
18
18
},
19
19
"require-dev" : {
20
+ "scaytrase/symfony-test-utils" : " ~1.1" ,
20
21
"phpunit/phpunit" : " ~4.6@stable|~5.0@stable" ,
21
22
"symfony/framework-bundle" : " ~2.3|~3.0"
22
23
},
24
+ "suggest" : {
25
+ "scaytrase/symfony-test-utils" : " For behat profiling"
26
+ },
23
27
"autoload" : {
24
28
"psr-0" : {
25
29
"" : " src/"
Original file line number Diff line number Diff line change 29
29
<directory >src/</directory >
30
30
</testsuite >
31
31
</testsuites >
32
- <logging >
33
- <log type =" coverage-html" target =" build/coverage" />
34
- <log type =" coverage-clover" target =" build/logs/clover.xml" />
35
- <log type =" junit" target =" build/logs/junit.xml" logIncompleteSkipped =" false" />
36
- </logging >
37
32
</phpunit >
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ public function iShouldReceiveSMSFor($phoneNumber)
27
27
28
28
/** @var MessageDeliveryDataCollector $collector */
29
29
$ collector = $ profiler ->getCollector ('sms_delivery.data_collector ' );
30
- PHPUnit_Framework_Assert::assertEquals (1 , $ collector ->getMessageCount ());
31
- $ messages = $ collector ->getRecords ();
30
+ PHPUnit_Framework_Assert::assertCount (1 , $ collector ->getData ());
31
+ $ packages = $ collector ->getData ();
32
32
/** @var ShortMessageInterface $message */
33
- $ message = $ messages [0 ][ ' message ' ] ;
34
- PHPUnit_Framework_Assert::assertEquals ('disabled ' , $ messages [0 ][ ' status ' ] );
33
+ $ message = $ packages [0 ]-> getMessage () ;
34
+ PHPUnit_Framework_Assert::assertEquals ('disabled ' , $ packages [0 ]-> getStatus () );
35
35
PHPUnit_Framework_Assert::assertNotEmpty ($ message ->getBody ());
36
36
PHPUnit_Framework_Assert::assertEquals ($ phoneNumber , $ message ->getRecipient ());
37
37
preg_match ('/\d{6}/ ' , $ message ->getBody (), $ matches );
@@ -62,5 +62,4 @@ protected function fixStepArgument($argument)
62
62
{
63
63
return str_replace ('\\" ' , '" ' , $ argument );
64
64
}
65
-
66
65
}
You can’t perform that action at this time.
0 commit comments