You need to create a configuration file for phpunit, inside that configuration file you can exclude specific files or directories from code coverage.
Example file looks like this:
<phpunit stopOnFailure="false">
<testsuite name="Name">
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../php</directory>
<exclude>
<file>../php/somefile.php</file>
<directory suffix=".php">../php/pdf</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="target-dir/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-clover" target="target-dir/build/logs/clover.xml"/>
</logging>
</phpunit>
With the above file everything under ../php (this is relative from the directory where tests are in and phprun is executed from) is included in code coverage, except the file ../php/somefile.php and all files with extension .php from directory ../php/pdf
Name this file phpunit.xml, put it into the same directory where you run the tests from. Them, if you run phpunit, it will pick the conf up.
If you cannot use this particular filename, you can give name from the command line
phpunit --configuration yourconf.xml
More details about phpunit configuration file is available at: http://phpunit.de/manual/3.7/en/appendixes.configuration.html