Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

class AbstractShapeTest extends PHPUnit_Framework_TestCase
{
    public function tearDown()
    {
        Mockery::close();
    }

    public function testBackground()
    {
        $shape = $this->getMockForAbstractClass('\Intervention\Image\AbstractShape');
        $shape->background('foo');
        $this->assertEquals('foo', $shape->background);
        $this->assertEquals(0, $shape->border_width);
    }

    public function testBorder()
    {
        $shape = $this->getMockForAbstractClass('\Intervention\Image\AbstractShape');
        $shape->border(4);
        $this->assertEquals(4, $shape->border_width);
        $this->assertEquals('#000000', $shape->border_color);
    }

    public function testBorderWithColor()
    {
        $shape = $this->getMockForAbstractClass('\Intervention\Image\AbstractShape');
        $shape->border(3, '#ff00ff');
        $this->assertEquals(3, $shape->border_width);
        $this->assertEquals('#ff00ff', $shape->border_color);
    }

    public function testHasBorder()
    {
        $shape = $this->getMockForAbstractClass('\Intervention\Image\AbstractShape');
        $this->assertFalse($shape->hasBorder());
        $shape->border(1);
        $this->assertTrue($shape->hasBorder());
    }
}

Commits for Nextrek/Aiba_backup/vendor/intervention/image/tests/AbstractShapeTest.php

Diff revisions: vs.
Revision Author Commited Message
1464 MOliva picture MOliva Tue 13 Oct, 2020 11:16:56 +0000