1 | <?php |
||
12 | class ImageTest extends Test |
||
13 | { |
||
14 | /** |
||
15 | * @test |
||
16 | */ |
||
17 | public function itCreatesImages() |
||
18 | { |
||
19 | $image = new Image(__DIR__ . "/fixtures/fez-1.png"); |
||
20 | |||
21 | $this->assertEquals(400, $image->getWidth()); |
||
22 | $this->assertEquals(300, $image->getHeight()); |
||
23 | |||
24 | $bitmap = $image->getBitmap(); |
||
25 | |||
26 | $this->assertInternalType("array", $bitmap); |
||
27 | $this->assertEquals(300, count($bitmap)); |
||
28 | |||
29 | // test secondary types |
||
30 | |||
31 | new Image(__DIR__ . "/fixtures/fez-1.jpg"); |
||
32 | new Image(__DIR__ . "/fixtures/fez-1.gif"); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @test |
||
37 | * @expectedException InvalidArgumentException |
||
38 | */ |
||
39 | public function itThrowsForMissingImage() |
||
43 | |||
44 | /** |
||
45 | * @test |
||
46 | * @expectedException InvalidArgumentException |
||
47 | */ |
||
48 | public function itThrowsForInvalidImage() |
||
52 | |||
53 | /** |
||
54 | * @test |
||
55 | */ |
||
56 | public function itDerivesDifferences() |
||
67 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.