Fatal error: Class 'ZipArchive' - not found when using PHPUnit

Viewed 3399

I have refactored some PHP code and putting it through a series of PHPUnit classes.

I get the above Fatal Error when running PHPUnit (3.7.28) on it (through console).

PHP version is 5.4.6-1ubuntu1.4 (cli).

I know the Zip class is working and available as it works when running the code normally (also via console)

Thoughts / ideas appreciated.

Thanks!

<?php

namespace phpUnit\Test;

Class MyTest extends \PHPUnit_Framework_TestCase
{
Public Function setUp()
    {
    $this->zip = new ZipArchive();
    }
}
1 Answers
Related