@@ -36,31 +36,31 @@ public function testDumpSortedMessagesAndClean()
36
36
{
37
37
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' , 'test ' => 'test ' , 'bar ' => 'bar ' ]]);
38
38
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true , '--sort ' => 'asc ' ]);
39
- $ this ->assertRegExp ("/\*bar\*foo\*test/ " , preg_replace ('/\s+/ ' , '' , $ tester ->getDisplay ()));
40
- $ this ->assertRegExp ('/3 messages were successfully extracted/ ' , $ tester ->getDisplay ());
39
+ $ this ->assertMatchesRegularExpression ("/\*bar\*foo\*test/ " , preg_replace ('/\s+/ ' , '' , $ tester ->getDisplay ()));
40
+ $ this ->assertMatchesRegularExpression ('/3 messages were successfully extracted/ ' , $ tester ->getDisplay ());
41
41
}
42
42
43
43
public function testDumpReverseSortedMessagesAndClean ()
44
44
{
45
45
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' , 'test ' => 'test ' , 'bar ' => 'bar ' ]]);
46
46
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true , '--sort ' => 'desc ' ]);
47
- $ this ->assertRegExp ("/\*test\*foo\*bar/ " , preg_replace ('/\s+/ ' , '' , $ tester ->getDisplay ()));
48
- $ this ->assertRegExp ('/3 messages were successfully extracted/ ' , $ tester ->getDisplay ());
47
+ $ this ->assertMatchesRegularExpression ("/\*test\*foo\*bar/ " , preg_replace ('/\s+/ ' , '' , $ tester ->getDisplay ()));
48
+ $ this ->assertMatchesRegularExpression ('/3 messages were successfully extracted/ ' , $ tester ->getDisplay ());
49
49
}
50
50
51
51
public function testDumpSortWithoutValueAndClean ()
52
52
{
53
53
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' , 'test ' => 'test ' , 'bar ' => 'bar ' ]]);
54
54
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true , '--sort ' ]);
55
- $ this ->assertRegExp ("/\*bar\*foo\*test/ " , preg_replace ('/\s+/ ' , '' , $ tester ->getDisplay ()));
56
- $ this ->assertRegExp ('/3 messages were successfully extracted/ ' , $ tester ->getDisplay ());
55
+ $ this ->assertMatchesRegularExpression ("/\*bar\*foo\*test/ " , preg_replace ('/\s+/ ' , '' , $ tester ->getDisplay ()));
56
+ $ this ->assertMatchesRegularExpression ('/3 messages were successfully extracted/ ' , $ tester ->getDisplay ());
57
57
}
58
58
59
59
public function testDumpWrongSortAndClean ()
60
60
{
61
61
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' , 'test ' => 'test ' , 'bar ' => 'bar ' ]]);
62
62
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true , '--sort ' => 'test ' ]);
63
- $ this ->assertRegExp ('/\[ERROR\] Wrong sort order/ ' , $ tester ->getDisplay ());
63
+ $ this ->assertMatchesRegularExpression ('/\[ERROR\] Wrong sort order/ ' , $ tester ->getDisplay ());
64
64
}
65
65
66
66
public function testDumpMessagesAndCleanInRootDirectory ()
0 commit comments