Skip to content

Commit

Permalink
Update expected exception method from onlyMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeder committed Aug 20, 2021
1 parent b34784c commit e22b648
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .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;}}}
2 changes: 1 addition & 1 deletion test/ChainTest.php
Expand Up @@ -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();
Expand Down

0 comments on commit e22b648

Please sign in to comment.