From 4e8d22e61609a5c90db9fd707a2e16221e05a5a9 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Thu, 8 Dec 2016 08:39:49 -0500 Subject: [PATCH] Use assertContains instead of assertTrue + strpos --- tests/PhpFpmTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/PhpFpmTest.php b/tests/PhpFpmTest.php index 012964b..fdd8997 100644 --- a/tests/PhpFpmTest.php +++ b/tests/PhpFpmTest.php @@ -27,9 +27,9 @@ public function test_fpm_is_configured_with_the_correct_user_group_and_port() copy(__DIR__.'/files/fpm.conf', __DIR__.'/output/fpm.conf'); resolve(StubForUpdatingFpmConfigFiles::class)->updateConfiguration(); $contents = file_get_contents(__DIR__.'/output/fpm.conf'); - $this->assertTrue(strpos($contents, sprintf("\nuser = %s", user())) !== false); - $this->assertTrue(strpos($contents, "\ngroup = staff") !== false); - $this->assertTrue(strpos($contents, "\nlisten = /Users/".user()."/.valet/valet.sock") !== false); + $this->assertContains(sprintf("\nuser = %s", user()), $contents); + $this->assertContains("\ngroup = staff", $contents); + $this->assertContains("\nlisten = /Users/".user()."/.valet/valet.sock", $contents); } }