This repository has been archived on 2018-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
sleepy/tests/Type/JSONTest.php

41 lines
860 B
PHP
Raw Normal View History

2014-05-07 14:05:13 -04:00
<?php
require_once(BASEPATH . 'core/iType.php');
require_once(BASEPATH . 'core/aType.php');
require_once(BASEPATH . 'types/JSON.php');
use Sleepy\core;
use Sleepy\types\JSON;
use Sleepy\execeptions;
class MockJSON extends JSON {
protected $mime = '';
}
class JSONTest extends Sleepy_Testcase {
public function setUp() {
$this->JSON = new JSON([]);
}
public function testSanity() {
$this->assertTrue(is_a($this->JSON, 'Sleepy\\types\\JSON'));
$this->assertTrue(is_a($this->JSON, 'Sleepy\\core\\aType'));
$this->assertEquals(['Sleepy\\core\\iType' => 'Sleepy\\core\\iType'], class_implements('Sleepy\\types\\JSON'));
}
public function testFunction()
public function testNIE() {
try {
$json = new MockJSON([]);
}
catch (Sleepy\exceptions\NotImplementedException $e) {
$this->assertTrue(TRUE);
}
}
}
// End of JSONTest