Page MenuHomePhabricator

D665.diff
No OneTemporary

D665.diff

diff --git a/App.php b/App.php
--- a/App.php
+++ b/App.php
@@ -1,7 +1,5 @@
<?php namespace spitfire;
-use spitfire\core\app\AppAssetsInterface;
-use spitfire\core\app\RecursiveAppAssetLocator;
use spitfire\core\Environment;
use spitfire\core\Path;
use spitfire\core\router\Parameters;
diff --git a/SpitFire.php b/SpitFire.php
--- a/SpitFire.php
+++ b/SpitFire.php
@@ -3,9 +3,7 @@
use Psr\Log\LoggerInterface;
use spitfire\App;
use spitfire\core\app\AppNotFoundException;
-use spitfire\core\app\AppAssetsInterface;
use spitfire\core\app\Cluster;
-use spitfire\core\app\RecursiveAppAssetLocator;
use spitfire\core\Context;
use spitfire\core\Environment;
use spitfire\core\Locations;
@@ -264,19 +262,6 @@
ini_set("display_errors" , Environment::get('debug_mode')? '1' : '0');
}
- /**
- * Returns the current request.
- *
- * @return Request The current request
- */
- public function getRequest() {
- return $this->request;
- }
-
- public function assets() : AppAssetsInterface {
- return new RecursiveAppAssetLocator($this->getCWD() . '/assets/src/');
- }
-
/**
* Return the dependency container for this Spitfire instance. This container
* allows the application to inject behaviors into the
diff --git a/tests/core/app/AppAssetsLocationTest.php b/tests/core/app/AppAssetsLocationTest.php
deleted file mode 100644
--- a/tests/core/app/AppAssetsLocationTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php namespace tests\spitfire\core\app;
-
-use PHPUnit\Framework\TestCase;
-
-/*
- * The MIT License
- *
- * Copyright 2020 César de la Cal Bretschneider <cesar@magic3w.com>.
- *
- * 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.
- */
-
-class AppAssetsLocationTest extends TestCase
-{
-
- public function testListingFiles() {
- $map = (new \spitfire\core\app\RecursiveAppAssetLocator(realpath(dirname(__DIR__))))->all();
- $this->assertInstanceOf(\spitfire\collection\DefinedCollection::class, $map);
- $this->assertEquals(true, file_exists(dirname(__DIR__) . '/' . $map[0]));
- $this->assertEquals(true, file_exists(dirname(__DIR__) . '/' . $map->rewind()));
- }
-
-}

File Metadata

Mime Type
text/plain
Expires
Apr 12 2021, 9:47 AM (9 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6085
Default Alt Text
D665.diff (3 KB)

Event Timeline