Issues (112)

tests/Geo6/ServiceTest.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Tests\Geo6;
4
5
use Bpost\BpostApiClient\Geo6\Service;
6
use PHPUnit_Framework_TestCase;
0 ignored issues
show
The type PHPUnit_Framework_TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class ServiceTest extends PHPUnit_Framework_TestCase
9
{
10
    /**
11
     * Tests Service::createFromXml()
12
     */
13
    public function testCreateFromXml()
14
    {
15
        $data = array(
16
            'category' => '2',
17
            'flag' => '10',
18
            'Name' => 'Loket met Bancontact/Mistercash',
19
        );
20
21
        // build xml
22
        $xmlString = '<Service';
23
        $xmlString .= ' category="' . $data['category'] . '"';
24
        $xmlString .= ' flag="' . $data['flag'] . '"';
25
        $xmlString .= '>';
26
        $xmlString .= $data['Name'];
27
        $xmlString .= '</Service>';
28
        $xml = simplexml_load_string($xmlString);
29
30
        $service = Service::createFromXML($xml);
31
32
        $this->assertSame($data['category'], $service->getCategory());
33
        $this->assertSame($data['flag'], $service->getFlag());
34
        $this->assertSame($data['Name'], $service->getName());
35
    }
36
}
37