Upgraded dependencies, upped LICENSE, removed testing framework.
WebAppComponent is a simple wrapper. Nothing more.
This commit is contained in:
parent
c5621f452f
commit
2c0ce5bb43
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,4 +5,4 @@ build/
|
|||||||
test/temp/
|
test/temp/
|
||||||
vendor/
|
vendor/
|
||||||
application/
|
application/
|
||||||
www/
|
www/
|
@ -1,82 +0,0 @@
|
|||||||
before_script:
|
|
||||||
# Install dependencies
|
|
||||||
- set -xe
|
|
||||||
- apt-get update -yqq
|
|
||||||
- apt-get install git zip unzip -yqq
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
build:composer:
|
|
||||||
image: php:7.2
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- curl -sS https://getcomposer.org/installer | php
|
|
||||||
- php composer.phar install
|
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
||||||
|
|
||||||
test:7.1:
|
|
||||||
stage: test
|
|
||||||
image: php:7.1
|
|
||||||
script:
|
|
||||||
- vendor/bin/phpunit -c test/phpunit.xml
|
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
||||||
paths:
|
|
||||||
- vendor
|
|
||||||
|
|
||||||
test:7.2:
|
|
||||||
stage: test
|
|
||||||
image: php:7.2
|
|
||||||
script:
|
|
||||||
- vendor/bin/phpunit -c test/phpunit.xml
|
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
||||||
|
|
||||||
test:7.3:
|
|
||||||
stage: test
|
|
||||||
image: php:7.3
|
|
||||||
script:
|
|
||||||
- vendor/bin/phpunit -c test/phpunit.xml
|
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
||||||
|
|
||||||
test:coverage:
|
|
||||||
stage: test
|
|
||||||
image: php:7.2
|
|
||||||
script:
|
|
||||||
- pecl install xdebug
|
|
||||||
- docker-php-ext-enable xdebug
|
|
||||||
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
|
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
||||||
|
|
||||||
release:
|
|
||||||
stage: deploy
|
|
||||||
image: php:7.2
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- pecl install xdebug
|
|
||||||
- docker-php-ext-enable xdebug
|
|
||||||
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
|
|
||||||
artifacts:
|
|
||||||
name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
|
|
||||||
paths:
|
|
||||||
- build/
|
|
||||||
expire_in: 3 weeks
|
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
12
.travis.yml
12
.travis.yml
@ -1,12 +0,0 @@
|
|||||||
language: php
|
|
||||||
|
|
||||||
php:
|
|
||||||
- 7.1
|
|
||||||
- 7.2
|
|
||||||
- 7.3
|
|
||||||
|
|
||||||
script:
|
|
||||||
- php vendor/bin/phpunit -v -c test/phpunit.xml --coverage-text
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- composer install
|
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2013-2019 TechFuze
|
Copyright (c) 2013-2021 TechFuze
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -13,20 +13,15 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1.0",
|
"php": ">=7.4.0",
|
||||||
"fuzeworks/core": "~1.2.0",
|
"fuzeworks/webcomponent": "~1.2.7",
|
||||||
"fuzeworks/mvcr": "~1.2.0",
|
"fuzeworks/tracycomponent": "~1.2.1",
|
||||||
"fuzeworks/webcomponent": "~1.2.0",
|
|
||||||
"fuzeworks/tracycomponent": "~1.2.0",
|
|
||||||
"fuzeworks/layout": "~1.2.0",
|
"fuzeworks/layout": "~1.2.0",
|
||||||
"fuzeworks/database": "~1.2.0",
|
"fuzeworks/database": "~1.2.3",
|
||||||
"smarty/smarty": "3.1.*",
|
"smarty/smarty": "3.1.*",
|
||||||
"latte/latte": "2.5.*",
|
"latte/latte": "2.10.*",
|
||||||
"ext-json": "*"
|
"ext-json": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^7"
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"FuzeWorks\\": "src/FuzeWorks/"
|
"FuzeWorks\\": "src/FuzeWorks/"
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* FuzeWorks Framework WebApp Component.
|
|
||||||
*
|
|
||||||
* The FuzeWorks PHP FrameWork
|
|
||||||
*
|
|
||||||
* Copyright (C) 2013-2018 TechFuze
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
* @author TechFuze
|
|
||||||
* @copyright Copyright (c) 2013 - 2018, TechFuze. (http://techfuze.net)
|
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
|
||||||
*
|
|
||||||
* @link http://techfuze.net/fuzeworks
|
|
||||||
* @since Version 0.0.1
|
|
||||||
*
|
|
||||||
* @version Version 1.2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// First set the working directory
|
|
||||||
chdir(dirname(__DIR__));
|
|
||||||
|
|
||||||
// Load composer
|
|
||||||
require_once(dirname(__DIR__) . '/vendor/autoload.php');
|
|
||||||
|
|
||||||
// Load the test abstract
|
|
||||||
require_once 'webapp/WebAppTestAbstract.php';
|
|
||||||
|
|
||||||
// Reset error and exception handlers
|
|
||||||
restore_error_handler();
|
|
||||||
restore_exception_handler();
|
|
||||||
|
|
||||||
// Display all errors
|
|
||||||
ini_set('display_errors', 1);
|
|
||||||
error_reporting(E_ALL | E_STRICT);
|
|
@ -1,34 +0,0 @@
|
|||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
|
|
||||||
bootstrap="autoload.php"
|
|
||||||
convertErrorsToExceptions="true"
|
|
||||||
convertNoticesToExceptions="true"
|
|
||||||
convertWarningsToExceptions="true"
|
|
||||||
stopOnError="false"
|
|
||||||
stopOnFailure="false"
|
|
||||||
stopOnIncomplete="false"
|
|
||||||
stopOnSkipped="false"
|
|
||||||
colors="false">
|
|
||||||
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="Core Functionality">
|
|
||||||
<directory>./</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<logging>
|
|
||||||
<log type="json" target="../build/phpunit/logfile.json"/>
|
|
||||||
<log type="junit" target="../build/phpunit/logfile.xml"/>
|
|
||||||
<log type="testdox-html" target="../build/phpunit/testdox.html"/>
|
|
||||||
<log type="testdox-text" target="../build/phpunit/testdox.txt"/>
|
|
||||||
</logging>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<whitelist processUncoveredFilesFromWhitelist="false">
|
|
||||||
<directory suffix=".php">../</directory>
|
|
||||||
<exclude>
|
|
||||||
<directory suffix=".php">../vendor/</directory>
|
|
||||||
<directory suffix=".php">../test/</directory>
|
|
||||||
</exclude>
|
|
||||||
</whitelist>
|
|
||||||
</filter>
|
|
||||||
</phpunit>
|
|
@ -1,57 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* FuzeWorks Framework WebApp Component.
|
|
||||||
*
|
|
||||||
* The FuzeWorks PHP FrameWork
|
|
||||||
*
|
|
||||||
* Copyright (C) 2013-2018 TechFuze
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
* @author TechFuze
|
|
||||||
* @copyright Copyright (c) 2013 - 2018, TechFuze. (http://techfuze.net)
|
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
|
||||||
*
|
|
||||||
* @link http://techfuze.net/fuzeworks
|
|
||||||
* @since Version 0.0.1
|
|
||||||
*
|
|
||||||
* @version Version 1.2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
use FuzeWorks\WebAppComponent;
|
|
||||||
|
|
||||||
class WebAppComponentTest extends WebAppTestAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var WebAppComponent
|
|
||||||
*/
|
|
||||||
protected $component;
|
|
||||||
|
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
$this->component = new WebAppComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isInstance()
|
|
||||||
{
|
|
||||||
$this->assertInstanceOf('\FuzeWorks\WebAppComponent', $this->component);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,60 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* FuzeWorks Framework WebApp Component.
|
|
||||||
*
|
|
||||||
* The FuzeWorks PHP FrameWork
|
|
||||||
*
|
|
||||||
* Copyright (C) 2013-2018 TechFuze
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
* @author TechFuze
|
|
||||||
* @copyright Copyright (c) 2013 - 2018, TechFuze. (http://techfuze.net)
|
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
|
||||||
*
|
|
||||||
* @link http://techfuze.net/fuzeworks
|
|
||||||
* @since Version 0.0.1
|
|
||||||
*
|
|
||||||
* @version Version 1.2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
use FuzeWorks\Events;
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
use FuzeWorks\Factory;
|
|
||||||
use FuzeWorks\Core;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class WebAppTestAbstract.
|
|
||||||
*
|
|
||||||
* Resets core components to their original state
|
|
||||||
*/
|
|
||||||
abstract class WebAppTestAbstract extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Remove all listeners before the next test starts.
|
|
||||||
*/
|
|
||||||
public function tearDown()
|
|
||||||
{
|
|
||||||
// Clear all events created by tests
|
|
||||||
Events::$listeners = array();
|
|
||||||
|
|
||||||
// Reset all config files
|
|
||||||
Factory::getInstance()->config->discardConfigFiles();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user