From a2dfff35e098a5004ef0ca0b143a408ab1f034d8 Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Thu, 25 Jul 2024 05:19:58 -0700 Subject: [PATCH 1/2] =?UTF-8?q?test:=20=E2=9C=85=20Update=20phpunit=20conf?= =?UTF-8?q?ig=20file=20format.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + phpunit.xml | 40 +++++++++++++++++----------------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index fc75387..aa692a3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ phpunit.phar composer.lock .phpunit.result.cache .idea +.phpunit* diff --git a/phpunit.xml b/phpunit.xml index 410cf16..ec9d395 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,25 +1,19 @@ - - - - tests - - - - - ./src - - - - - + + + + + + + + + tests + + + + + + ./src + + From c3021a403c24773f5d8ea4803482f245c886037f Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Thu, 25 Jul 2024 05:30:42 -0700 Subject: [PATCH 2/2] Fixed tests. --- tests/ModelTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 18ef7fc..a2cec0b 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -224,11 +224,11 @@ public function testGuardedCallback() { ModelStub::unguard(); $mock = $this->getMockBuilder('stdClass') - ->setMethods(['callback']) + ->addMethods(['callback']) ->getMock(); $mock->expects($this->once()) ->method('callback') - ->will($this->returnValue('foo')); + ->willReturn('foo'); $string = ModelStub::unguarded([$mock, 'callback']); $this->assertEquals('foo', $string); ModelStub::reguard();