Version 0.3
This commit is contained in:
parent
0d69145ec3
commit
ad3a5af623
130 changed files with 7283 additions and 2627 deletions
56
tests/FFMpeg/Tests/FFProbe/DataMapping/AbstractDataTest.php
Normal file
56
tests/FFMpeg/Tests/FFProbe/DataMapping/AbstractDataTest.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Tests\FFProbe\DataMapping;
|
||||
|
||||
use FFMpeg\Tests\TestCase;
|
||||
use FFMpeg\FFProbe\DataMapping\AbstractData;
|
||||
|
||||
class AbstractDataTest extends TestCase
|
||||
{
|
||||
public function testHas()
|
||||
{
|
||||
$imp = new Implementation(array('key1' => 'value1', 'key2' => 'value2'));
|
||||
|
||||
$this->assertTrue($imp->has('key1'));
|
||||
$this->assertTrue($imp->has('key2'));
|
||||
$this->assertFalse($imp->has('value1'));
|
||||
$this->assertFalse($imp->has('key3'));
|
||||
}
|
||||
|
||||
public function testGet()
|
||||
{
|
||||
$imp = new Implementation(array('key1' => 'value1', 'key2' => 'value2'));
|
||||
|
||||
$this->assertEquals('value1', $imp->get('key1'));
|
||||
$this->assertEquals('value2', $imp->get('key2'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException FFMpeg\Exception\InvalidArgumentException
|
||||
*/
|
||||
public function testGetInvalid()
|
||||
{
|
||||
$imp = new Implementation(array('key1' => 'value1', 'key2' => 'value2'));
|
||||
|
||||
$imp->get('key3');
|
||||
}
|
||||
|
||||
public function testKeys()
|
||||
{
|
||||
$imp = new Implementation(array('key1' => 'value1', 'key2' => 'value2'));
|
||||
|
||||
$this->assertEquals(array('key1', 'key2'), $imp->keys());
|
||||
}
|
||||
|
||||
public function testAll()
|
||||
{
|
||||
$values = array('key1' => 'value1', 'key2' => 'value2');
|
||||
$imp = new Implementation($values);
|
||||
|
||||
$this->assertEquals($values, $imp->all());
|
||||
}
|
||||
}
|
||||
|
||||
class Implementation extends AbstractData
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue