From 0f2558dab3d893a3ab72c6c39377ec5bd5e47763 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Mon, 5 Jan 2015 12:05:17 -0700 Subject: [PATCH] Use assertContains in ClassMapAuthoritative checks Use assertContains instead of assertRegExp when checking for ClassMapAuthoritative settings. --- tests/Composer/Test/Autoload/AutoloadGeneratorTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index 54370381c..2ad1e4729 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -499,7 +499,7 @@ class AutoloadGeneratorTest extends TestCase include $this->vendorDir.'/composer/autoload_classmap.php' ); $this->assertAutoloadFiles('classmap5', $this->vendorDir.'/composer', 'classmap'); - $this->assertNotRegExp('/\$loader->setClassMapAuthoritative\(true\);/', file_get_contents($this->vendorDir.'/composer/autoload_real.php')); + $this->assertNotContains('$loader->setClassMapAuthoritative(true);', file_get_contents($this->vendorDir.'/composer/autoload_real.php')); } public function testClassMapAutoloadingAuthoritative() @@ -540,8 +540,7 @@ class AutoloadGeneratorTest extends TestCase ); $this->assertAutoloadFiles('classmap5', $this->vendorDir.'/composer', 'classmap'); - $this->assertRegExp('/\$loader->setClassMapAuthoritative\(true\);/', file_get_contents($this->vendorDir.'/composer/autoload_real.php')); - // FIXME: how can we actually test the ClassLoader implementation? + $this->assertContains('$loader->setClassMapAuthoritative(true);', file_get_contents($this->vendorDir.'/composer/autoload_real.php')); } public function testFilesAutoloadGeneration()