Merge branch '110release' into 'master'
Updated FuzeWorks Application Skeleton to 1.1.1 See merge request fuzeworks/Application!6
This commit is contained in:
commit
421570da8c
|
@ -8,7 +8,7 @@ stages:
|
|||
- deploy
|
||||
|
||||
build:composer:
|
||||
image: php:5.6
|
||||
image: php:7.1
|
||||
stage: build
|
||||
script:
|
||||
- curl -sS https://getcomposer.org/installer | php
|
||||
|
@ -18,16 +18,6 @@ build:composer:
|
|||
paths:
|
||||
- vendor/
|
||||
|
||||
test:5.6:
|
||||
stage: test
|
||||
image: php:5.6
|
||||
script:
|
||||
- vendor/bin/phpunit -c tests/phpunit.xml
|
||||
cache:
|
||||
key: "$CI_BUILD_REF/$CI_BUILD_REF_NAME"
|
||||
paths:
|
||||
- vendor/
|
||||
|
||||
test:7.0:
|
||||
stage: test
|
||||
image: php:7.0
|
||||
|
@ -38,9 +28,19 @@ test:7.0:
|
|||
paths:
|
||||
- vendor/
|
||||
|
||||
test:7.1:
|
||||
stage: test
|
||||
image: php:7.1
|
||||
script:
|
||||
- vendor/bin/phpunit -c tests/phpunit.xml
|
||||
cache:
|
||||
key: "$CI_BUILD_REF/$CI_BUILD_REF_NAME"
|
||||
paths:
|
||||
- vendor/
|
||||
|
||||
release:
|
||||
stage: deploy
|
||||
image: php:5.6
|
||||
image: php:7.1
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
|
|
|
@ -2,14 +2,10 @@ language: php
|
|||
|
||||
php:
|
||||
- 7
|
||||
- 5.6
|
||||
- 7.1
|
||||
|
||||
script:
|
||||
- php vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text
|
||||
|
||||
before_script:
|
||||
- composer install
|
||||
|
||||
addons:
|
||||
code_climate:
|
||||
repo_token: $CODECLIMATE_REPO_TOKEN
|
||||
- composer install
|
|
@ -55,6 +55,6 @@ class Standard extends ControllerAbstract
|
|||
public function index($path = null)
|
||||
{
|
||||
$this->output->cache(60);
|
||||
$this->layout->view('home');
|
||||
$this->layout->display('home');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,17 +14,13 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.6.0",
|
||||
"fuzeworks/core": "1.0.2",
|
||||
"latte/latte": "^2.4",
|
||||
"tracy/tracy": "^2.4",
|
||||
"smarty/smarty": "~3.1"
|
||||
"php": ">=7.0.0",
|
||||
"fuzeworks/core": "1.1.1",
|
||||
"latte/latte": "2.4.*",
|
||||
"tracy/tracy": "2.4.*",
|
||||
"smarty/smarty": "3.1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "5.3.*",
|
||||
"codeclimate/php-test-reporter": "dev-master"
|
||||
},
|
||||
"config": {
|
||||
"secure-http": false
|
||||
"phpunit/phpunit": "6.2.*"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class TestCase extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
|
@ -30,6 +30,7 @@
|
|||
* @version Version 1.0.0
|
||||
*/
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Application\Controller\Standard;
|
||||
use FuzeWorks\Layout;
|
||||
use FuzeWorks\Factory;
|
||||
|
@ -44,11 +45,13 @@ class standardTest extends TestCase
|
|||
{
|
||||
|
||||
private $controller;
|
||||
private $factory;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
require_once('application/Controller/controller.standard.php');
|
||||
$this->controller = new Standard();
|
||||
$this->factory = Factory::getInstance();
|
||||
}
|
||||
|
||||
public function testType()
|
||||
|
@ -59,12 +62,12 @@ class standardTest extends TestCase
|
|||
public function testIndex()
|
||||
{
|
||||
// First set a test file ready
|
||||
Layout::setDirectory(dirname(__FILE__) . '/testIndex/');
|
||||
$this->factory->layout->setDirectory(dirname(__FILE__) . '/testIndex/');
|
||||
|
||||
// Perform and retrieve the output
|
||||
ob_start();
|
||||
$this->controller->index();
|
||||
Factory::getInstance()->output->_display();
|
||||
$this->factory->output->_display();
|
||||
$output = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
|
@ -73,8 +76,8 @@ class standardTest extends TestCase
|
|||
|
||||
public function tearDown()
|
||||
{
|
||||
Layout::reset();
|
||||
Factory::getInstance()->output->set_output('');
|
||||
$this->factory->layout->reset();
|
||||
$this->factory->output->set_output('');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Core;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Class LoadFuzeWorksTest.
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -36,9 +36,6 @@ use Tracy\Debugger;
|
|||
// Load the FuzeWorks container
|
||||
$container = require(dirname(__DIR__) . '/application/bootstrap.php');
|
||||
|
||||
// Load the test abstract
|
||||
require_once 'TestCase.php';
|
||||
|
||||
// Reset error and exception handlers
|
||||
ob_start();
|
||||
restore_error_handler();
|
||||
|
|
Loading…
Reference in New Issue