This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//config/autoload/global.php | |
<?php | |
return array( | |
'service_manager' => array( | |
'factories' => array( | |
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory', | |
), | |
), | |
'db' => array( | |
'driver' => 'Pdo', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//config/autoload/local.php | |
<?php | |
return array( | |
'db' => array( | |
'username' => 'zend', | |
'password' => 'zend', | |
) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'db' => array( | |
'driver' => 'PDO', | |
'dsn' => 'mysql:dbname=zf2napratica_test;host=localhost', | |
'username' => 'zend', | |
'password' => 'zend', | |
'driver_options' => array( | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'' | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//queries used by tests | |
return array( | |
'posts' => array( | |
'create' => 'CREATE TABLE if not exists posts ( | |
id INT NOT NULL AUTO_INCREMENT , | |
title VARCHAR(250) NOT NULL , | |
description TEXT NOT NULL , | |
post_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , | |
PRIMARY KEY (id) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Model; | |
use Core\Test\ModelTestCase; | |
use Application\Model\Post; | |
use Zend\InputFilter\InputFilterInterface; | |
/** | |
* @group Model | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Model; | |
use Zend\InputFilter\Factory as InputFactory; | |
use Zend\InputFilter\InputFilter; | |
use Zend\InputFilter\InputFilterAwareInterface; | |
use Zend\InputFilter\InputFilterInterface; | |
use Core\Model\Entity; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Model; | |
use Core\Test\ModelTestCase; | |
use Application\Model\Post; | |
use Application\Model\Comment; | |
use Zend\InputFilter\InputFilterInterface; | |
/** | |
* @group Model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Model; | |
use Zend\InputFilter\Factory as InputFactory; | |
use Zend\InputFilter\InputFilter; | |
use Zend\InputFilter\InputFilterAwareInterface; | |
use Zend\InputFilter\InputFilterInterface; | |
use Core\Model\Entity; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Core\Test\ControllerTestCase; | |
use Application\Controller\IndexController; | |
use Application\Model\Post; | |
use Zend\Http\Request; | |
use Zend\Stdlib\Parameters; | |
use Zend\View\Renderer\PhpRenderer; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Controller; | |
use Zend\View\Model\ViewModel; | |
use Core\Controller\ActionController; | |
/** | |
* Controlador que gerencia os posts | |
* | |
* @category Application |