it was created the Structural namespace and append its patterns

This commit is contained in:
Antonio Spinelli
2014-04-15 23:14:39 -03:00
parent 7bf6593e3f
commit 113f63a54f
37 changed files with 77 additions and 69 deletions

View File

@@ -1,14 +1,14 @@
<?php
namespace DesignPatterns\Test\DataMapper;
namespace DesignPatterns\Structural\DataMapper;
use DesignPatterns\DataMapper\UserMapper;
use DesignPatterns\DataMapper\User;
use DesignPatterns\Structural\DataMapper\UserMapper;
use DesignPatterns\Structural\DataMapper\User;
/**
* UserMapperTest tests the datamapper pattern
*/
class UserMapperTest extends \PHPUnit_Framework_TestCase
class DataMapperTest extends \PHPUnit_Framework_TestCase
{
/**
* @var UserMapper
@@ -22,7 +22,7 @@ class UserMapperTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
$this->dbal = $this->getMockBuilder('DesignPatterns\DataMapper\DBAL')
$this->dbal = $this->getMockBuilder('DesignPatterns\Structural\DataMapper\DBAL')
->disableAutoload()
->setMethods(array('insert', 'update', 'find', 'findAll'))
->getMock();
@@ -90,7 +90,7 @@ class UserMapperTest extends \PHPUnit_Framework_TestCase
}
/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage User #404 not found
*/
public function testNotFound()

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\DataMapper;
namespace DesignPatterns\Structural\DataMapper;
/**
* DataMapper pattern

View File

@@ -1,6 +1,6 @@
<?php
namespace DesignPatterns\DataMapper;
namespace DesignPatterns\Structural\DataMapper;
/**
* class UserMapper