From e22b6487ecb11013f1b228b495f52f73df69b2ed Mon Sep 17 00:00:00 2001 From: Dan Feder Date: Fri, 20 Aug 2021 09:37:10 -0400 Subject: [PATCH] Update expected exception method from onlyMethods --- .circleci/config.yml | 3 ++- .phpunit.result.cache | 1 + test/ChainTest.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .phpunit.result.cache diff --git a/.circleci/config.yml b/.circleci/config.yml index 23af25b..dd04f17 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,11 +5,12 @@ jobs: - image: circleci/php:7.3 environment: CC_TEST_REPORTER_ID: 7b1ac919c90c8ea384b4998b267e0f629185a26ffdf0f96ef4f4a09f53488ed2 + XDEBUG_MODE: coverage working_directory: ~/repo steps: - checkout - run: - name: Setup Code Climate test-reporter + name: Set up Code Climate test-reporter command: | curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..2a01f04 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":614:{a:2:{s:7:"defects";a:1:{s:46:"MockChainTest\ChainTest::testNonExistentMethod";i:3;}s:5:"times";a:10:{s:29:"MockChainTest\ChainTest::test";d:0.007;s:30:"MockChainTest\ChainTest::test2";d:0.001;s:30:"MockChainTest\ChainTest::test3";d:0.001;s:30:"MockChainTest\ChainTest::test4";d:0.001;s:46:"MockChainTest\ChainTest::testNonExistentMethod";d:0;s:49:"MockChainTest\ChainTest::testUsingAdddIncorrectly";d:0;s:46:"MockChainTest\ChainTest::testNonExistentOption";d:0;s:31:"MockChainTest\OptionsTest::test";d:0;s:32:"MockChainTest\SequenceTest::test";d:0;s:52:"MockChainTest\SequenceTest::testSequenceThroughChain";d:0;}}} \ No newline at end of file diff --git a/test/ChainTest.php b/test/ChainTest.php index 7405090..e12a8ee 100644 --- a/test/ChainTest.php +++ b/test/ChainTest.php @@ -100,7 +100,7 @@ public function test4() public function testNonExistentMethod() { - $this->expectExceptionMessage("method blah does not exist in MockChainTest\Anatomy\Organ"); + $this->expectExceptionMessage('Trying to set mock method "blah" with onlyMethods'); (new Chain($this)) ->add(Organ::class, 'blah', null) ->getMock();