@@ -27,8 +27,8 @@ public function testDumpMessagesAndClean()
27
27
{
28
28
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' ]]);
29
29
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true ]);
30
- $ this ->assertRegExp ('/foo/ ' , $ tester ->getDisplay ());
31
- $ this ->assertRegExp ('/1 message was successfully extracted/ ' , $ tester ->getDisplay ());
30
+ $ this ->assertMatchesRegularExpression ('/foo/ ' , $ tester ->getDisplay ());
31
+ $ this ->assertMatchesRegularExpression ('/1 message was successfully extracted/ ' , $ tester ->getDisplay ());
32
32
}
33
33
34
34
public function testDumpMessagesAndCleanInRootDirectory ()
@@ -40,32 +40,32 @@ public function testDumpMessagesAndCleanInRootDirectory()
40
40
41
41
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' ]]);
42
42
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , '--dump-messages ' => true , '--clean ' => true ]);
43
- $ this ->assertRegExp ('/foo/ ' , $ tester ->getDisplay ());
44
- $ this ->assertRegExp ('/1 message was successfully extracted/ ' , $ tester ->getDisplay ());
43
+ $ this ->assertMatchesRegularExpression ('/foo/ ' , $ tester ->getDisplay ());
44
+ $ this ->assertMatchesRegularExpression ('/1 message was successfully extracted/ ' , $ tester ->getDisplay ());
45
45
}
46
46
47
47
public function testDumpTwoMessagesAndClean ()
48
48
{
49
49
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' , 'bar ' => 'bar ' ]]);
50
50
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true ]);
51
- $ this ->assertRegExp ('/foo/ ' , $ tester ->getDisplay ());
52
- $ this ->assertRegExp ('/bar/ ' , $ tester ->getDisplay ());
53
- $ this ->assertRegExp ('/2 messages were successfully extracted/ ' , $ tester ->getDisplay ());
51
+ $ this ->assertMatchesRegularExpression ('/foo/ ' , $ tester ->getDisplay ());
52
+ $ this ->assertMatchesRegularExpression ('/bar/ ' , $ tester ->getDisplay ());
53
+ $ this ->assertMatchesRegularExpression ('/2 messages were successfully extracted/ ' , $ tester ->getDisplay ());
54
54
}
55
55
56
56
public function testDumpMessagesForSpecificDomain ()
57
57
{
58
58
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' ], 'mydomain ' => ['bar ' => 'bar ' ]]);
59
59
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--dump-messages ' => true , '--clean ' => true , '--domain ' => 'mydomain ' ]);
60
- $ this ->assertRegExp ('/bar/ ' , $ tester ->getDisplay ());
61
- $ this ->assertRegExp ('/1 message was successfully extracted/ ' , $ tester ->getDisplay ());
60
+ $ this ->assertMatchesRegularExpression ('/bar/ ' , $ tester ->getDisplay ());
61
+ $ this ->assertMatchesRegularExpression ('/1 message was successfully extracted/ ' , $ tester ->getDisplay ());
62
62
}
63
63
64
64
public function testWriteMessages ()
65
65
{
66
66
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' ]]);
67
67
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--force ' => true ]);
68
- $ this ->assertRegExp ('/Translation files were successfully updated./ ' , $ tester ->getDisplay ());
68
+ $ this ->assertMatchesRegularExpression ('/Translation files were successfully updated./ ' , $ tester ->getDisplay ());
69
69
}
70
70
71
71
public function testWriteMessagesInRootDirectory ()
@@ -77,14 +77,14 @@ public function testWriteMessagesInRootDirectory()
77
77
78
78
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' ]]);
79
79
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , '--force ' => true ]);
80
- $ this ->assertRegExp ('/Translation files were successfully updated./ ' , $ tester ->getDisplay ());
80
+ $ this ->assertMatchesRegularExpression ('/Translation files were successfully updated./ ' , $ tester ->getDisplay ());
81
81
}
82
82
83
83
public function testWriteMessagesForSpecificDomain ()
84
84
{
85
85
$ tester = $ this ->createCommandTester (['messages ' => ['foo ' => 'foo ' ], 'mydomain ' => ['bar ' => 'bar ' ]]);
86
86
$ tester ->execute (['command ' => 'translation:update ' , 'locale ' => 'en ' , 'bundle ' => 'foo ' , '--force ' => true , '--domain ' => 'mydomain ' ]);
87
- $ this ->assertRegExp ('/Translation files were successfully updated./ ' , $ tester ->getDisplay ());
87
+ $ this ->assertMatchesRegularExpression ('/Translation files were successfully updated./ ' , $ tester ->getDisplay ());
88
88
}
89
89
90
90
protected function setUp ()
0 commit comments