PSR-0 for namespace and filename + tests

This commit is contained in:
Trismegiste
2013-05-13 20:13:19 +02:00
parent 953fde0c4f
commit f040f8043d
2 changed files with 40 additions and 6 deletions

View File

@ -0,0 +1,28 @@
<?php
/*
* DesignPatternPHP
*/
namespace DesignPatterns\Tests\FluentInterface;
use DesignPatterns\FluentInterface\SQL;
/**
* FluentInterfaceTest tests the fluent interface SQL
*/
class FluentInterfaceTest extends \PHPUnit_Framework_TestCase
{
public function testBuildSQL()
{
$instance = new SQL();
$query = $instance->select(array('foo', 'bar'))
->from('foobar', 'f')
->where('f.bar = ?')
->getQuery();
$this->assertEquals('SELECT foo,bar FROM foobar AS f WHERE f.bar = ?', $query);
}
}