Skip to content

Can't mock "exit" #11

Closed
Closed
@jmauerhan

Description

@jmauerhan

When I try to mock exit I get an error:

In my test: $this->getFunctionMock('Silva', 'exit');

When I run the test:

1) Test\Unit\ApplicationTest::testRunDefaultsToHelpMenu                                            
ParseError: syntax error, unexpected 'exit' (T_EXIT), expecting identifier (T_STRING) or '('       

***\vendor\php-mock\php-mock\classes\Mock.php:180                   
***\vendor\php-mock\php-mock\classes\Mock.php:87                    
***\vendor\php-mock\php-mock-phpunit\classes\PHPMock.php:89         
***\tests\ApplicationTest.php:19                                    

ERRORS!                                                                                            
Tests: 1, Assertions: 0, Errors: 1.                                                                                                                                                              

Versions:

phpunit/phpunit                    5.4.4
php-mock/php-mock                  1.0.1 
php-mock/php-mock-integration      1.0.0 
php-mock/php-mock-phpunit          1.1.1 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions