From e67df909789b7b63f71bec5d1dba5ca323d312c4 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 15 Aug 2019 17:21:55 +0800 Subject: [PATCH] Tiny tweaks --- app/Services/Plugin.php | 5 ----- tests/ServicesTest/PluginManagerTest.php | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/Services/Plugin.php b/app/Services/Plugin.php index 69ba61a3..0207b258 100644 --- a/app/Services/Plugin.php +++ b/app/Services/Plugin.php @@ -41,11 +41,6 @@ class Plugin return $this->getManifestAttr(Str::snake($name, '-')); } - public function __isset(string $name) - { - return isset($this->{$name}) || $this->getManifestAttr(Str::snake($name, '-')); - } - public function getManifest() { return $this->manifest; diff --git a/tests/ServicesTest/PluginManagerTest.php b/tests/ServicesTest/PluginManagerTest.php index df3825a1..760672c2 100644 --- a/tests/ServicesTest/PluginManagerTest.php +++ b/tests/ServicesTest/PluginManagerTest.php @@ -461,12 +461,12 @@ class PluginManagerTest extends TestCase $this->assertNull(plugin('nope')); $this->assertInstanceOf(Plugin::class, plugin('fake')); - $this->expectExceptionMessage('No such plugin.'); - plugin_assets('nope', 'relative'); - $this->assertEquals( url('plugins').'/fake/assets/relative?v=1', plugin_assets('fake', 'relative') ); + + $this->expectExceptionMessage('No such plugin.'); + plugin_assets('nope', 'relative'); } }