summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/test/lib/Elastica/Test/Exception/NotImplementedTest.php
blob: ff704638a6a1df1d793a10135b55cdf56ca44aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace Elastica\Test\Exception;

use Elastica\Exception\NotImplementedException;
use Elastica\Test\Base as BaseTest;

class NotImplementedTest extends BaseTest
{
    public function testInstance()
    {
        $code = 4;
        $message = 'Hello world';
        $exception = new NotImplementedException($message, $code);

        $this->assertInstanceOf('Elastica\Exception\NotImplementedException', $exception);
        $this->assertInstanceOf('Elastica\Exception\ExceptionInterface', $exception);
        $this->assertInstanceOf('Exception', $exception);

        $this->assertEquals($message, $exception->getMessage());
        $this->assertEquals($code, $exception->getCode());
    }
}