File: SwiftMailerTestCase.php

package info (click to toggle)
libphp-swiftmailer 5.4.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,544 kB
  • ctags: 6,512
  • sloc: php: 26,922; sh: 28; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 790 bytes parent folder | download
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
<?php

/**
 * A base test case with some custom expectations.
 *
 * @author Rouven Weßling
 */
class SwiftMailerTestCase extends \PHPUnit_Framework_TestCase
{
    public static function regExp($pattern)
    {
        if (!is_string($pattern)) {
            throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
        }

        return new PHPUnit_Framework_Constraint_PCREMatch($pattern);
    }

    public function assertIdenticalBinary($expected, $actual, $message = '')
    {
        $constraint = new IdenticalBinaryConstraint($expected);
        self::assertThat($actual, $constraint, $message);
    }

    protected function tearDown()
    {
        \Mockery::close();
    }

    protected function getMockery($class)
    {
        return \Mockery::mock($class);
    }
}