Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is a part of dflydev/placeholder-resolver.
|
||||
*
|
||||
* (c) Dragonfly Development Inc.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Dflydev\PlaceholderResolver\DataSource;
|
||||
|
||||
/**
|
||||
* ArrayDataSource Test
|
||||
*
|
||||
* @author Beau Simensen <beau@dflydev.com>
|
||||
*/
|
||||
class ArrayDataSourceTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Test basic functionality
|
||||
*/
|
||||
public function testBasic()
|
||||
{
|
||||
$dataSource = new ArrayDataSource(array(
|
||||
'a' => 'A',
|
||||
'b' => 'B',
|
||||
'c' => 'C',
|
||||
));
|
||||
|
||||
$this->assertTrue($dataSource->exists('a'));
|
||||
$this->assertTrue($dataSource->exists('b'));
|
||||
$this->assertTrue($dataSource->exists('c'));
|
||||
$this->assertFalse($dataSource->exists('d'));
|
||||
|
||||
$this->assertFalse($dataSource->exists('a', true));
|
||||
$this->assertFalse($dataSource->exists('d', true));
|
||||
|
||||
$this->assertEquals('A', $dataSource->get('a'));
|
||||
$this->assertEquals('B', $dataSource->get('b'));
|
||||
$this->assertEquals('C', $dataSource->get('c'));
|
||||
$this->assertNull($dataSource->get('d'));
|
||||
|
||||
$this->assertNull($dataSource->get('a', true));
|
||||
$this->assertNull($dataSource->get('d', true));
|
||||
}
|
||||
}
|
Reference in a new issue