From 4872f0aac1886a444b2661b0ecf5dc9cd65d5c1d Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Thu, 4 Apr 2019 22:58:14 -0500 Subject: [PATCH] Undo the last bone-headed commit. --- app/Config/Autoload.php | 1 - app/Controllers/Home.php | 3 --- app/Models/UserModel.php | 34 ------------------------------- tests/ControllerTest.php | 43 ---------------------------------------- tests/DatabaseTest.php | 28 -------------------------- tests/HomeTest.php | 31 ----------------------------- 6 files changed, 140 deletions(-) delete mode 100644 app/Models/UserModel.php delete mode 100644 tests/ControllerTest.php delete mode 100644 tests/DatabaseTest.php delete mode 100644 tests/HomeTest.php diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php index 82c33cffd6..af0e2018fb 100644 --- a/app/Config/Autoload.php +++ b/app/Config/Autoload.php @@ -53,7 +53,6 @@ class Autoload extends \CodeIgniter\Config\AutoloadConfig 'Config' => APPPATH . 'Config', APP_NAMESPACE => APPPATH, // For custom namespace 'App' => APPPATH, // To ensure filters, etc still found, - 'Vulcan' => ROOTPATH . '../vulcan/', ]; /** diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index ef9844f85e..c0645e08c2 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -7,9 +7,6 @@ class Home extends BaseController { public function index() { - $model = new UserModel(); - dd($model->findAll()); - return view('welcome_message'); } diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php deleted file mode 100644 index e23e34a241..0000000000 --- a/app/Models/UserModel.php +++ /dev/null @@ -1,34 +0,0 @@ - 'integer|max_length[11]', - 'name' => 'alpha_numeric_spaces|max_length[255]', - 'email' => 'alpha_numeric_spaces|max_length[255]', - - ]; - protected $validationMessages = []; - protected $skipValidation = false; -} diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php deleted file mode 100644 index 98aa0906d2..0000000000 --- a/tests/ControllerTest.php +++ /dev/null @@ -1,43 +0,0 @@ -withUri('http://localhost:8080') - ->controller(Home::class) - ->execute('index'); - - // Success Status - $this->assertTrue($result->isOK()); - - // Not a Redirect - $this->assertFalse($result->isRedirect()); - - $request = $result->request(); - $this->assertInstanceOf(IncomingRequest::class, $request); - - $response = $result->response(); - $this->assertInstanceOf(Response::class, $response); - - $body = $result->getBody(); - $this->assertNotEmpty($body); - - // Check the content of the page - $this->assertTrue($result->see('CodeIgniter')); - - $this->assertTrue($result->dontSee('Laravel')); - - $this->assertTrue($result->seeElement('.logo')); - - $this->assertTrue($result->seeLink('User Guide')); - } -} diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php deleted file mode 100644 index b439bf6f56..0000000000 --- a/tests/DatabaseTest.php +++ /dev/null @@ -1,28 +0,0 @@ -hasInDatabase('user', [ - 'name' => 'Foo Bar', - 'email' => 'foobar@example.com', - 'country' => 'US', - ]); - - $this->seeInDatabase('user', [ - 'name' => 'Foo Bar', - ]); - - $this->dontSeeInDatabase('user', [ - 'name' => 'Fannie Farkle', - ]); - - $name = $this->grabFromDatabase('user', 'name', ['email' => 'foobar@example.com']); - $this->assertEquals('Foo Bar', $name); - - $this->seeNumRecords(1, 'user', ['name' => 'Foo Bar']); - } -} diff --git a/tests/HomeTest.php b/tests/HomeTest.php deleted file mode 100644 index 54819586c0..0000000000 --- a/tests/HomeTest.php +++ /dev/null @@ -1,31 +0,0 @@ -skipEvents()->call('get', '/'); - - $result->assertOk(); - - $result->assertStatus(200); - - $result->assertSee('CodeIgniter'); - $result->assertDontSee('Symfony'); - } - - public function testJson() - { - $result = $this->get('api'); - - $json = $result->getJSON(); - - $result->assertJSONFragment(['foo' => 'bar']); - $result->assertJSONExact([ - 'foo' => 'bar', - 'bar' => 'none', - ]); - } -}