# Phpunit exits with code 2

**URL:** <https://travis-ci.community/t/phpunit-exits-with-code-2/1302>\
**Category:** Uncategorized\
**Created:** [December 7, 2018, 1:53pm UTC](https://travis-ci.community/t/phpunit-exits-with-code-2/1302 "2018-12-07T13:53:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helveg](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/helveg/32/3372_2.png) [@Helveg](https://travis-ci.community/u/Helveg)\
**Post date:** [December 7, 2018, 1:53pm UTC](https://travis-ci.community/t/phpunit-exits-with-code-2/1302/1 "2018-12-07T13:53:20Z")

</div>

Hi! Super newbie to travis here. This is my .travis.yml config, and I really just want to execute some self-written test scripts every time I push changes to my repository:

```
language: php
php:
  - '7.0'
install:
  - composer install

```

But when building for some reason travis already executes the command “phpunit”, probably because it is mentioned as the default build script? This command however results in the man page being displayed in the log and exits with code 2 resulting in a failed build. How do I prevent “phpunit” from being sent to the console and instead run a php file?

---

<div class="post-metadata">

**Author:** ![Helveg](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/helveg/32/3372_2.png) [@Helveg](https://travis-ci.community/u/Helveg)\
**Post date:** [December 7, 2018, 2:59pm UTC](https://travis-ci.community/t/phpunit-exits-with-code-2/1302/2 "2018-12-07T14:59:52Z")

</div>

I think I did it by adding this line:

```
script: php my_test_file.php
```
