forked from TelegramBot/Api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseTypeTest.php
More file actions
30 lines (23 loc) · 736 Bytes
/
BaseTypeTest.php
File metadata and controls
30 lines (23 loc) · 736 Bytes
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
<?php
namespace TelegramBot\Api\Test;
class BaseTypeTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
include_once('tests/_fixtures/TestBaseType.php');
}
public function testRequiredParams()
{
$testItem = new \TestBaseType();
$this->assertAttributeEquals(array('test1', 'test2'), 'requiredParams', $testItem);
}
public function testValidate() {
$this->assertTrue(\TestBaseType::validate(array('test1' => 1, 'test2' => 2, 'test3' => 3)));
}
/**
* @expectedException \TelegramBot\Api\InvalidArgumentException
*/
public function testValidateFail() {
$this->assertTrue(\TestBaseType::validate(array('test1' => 1)));
}
}