Skip to content

Commit b8627e2

Browse files
committed
Working on the tests. Not able to get the namespace thing done
correctly. This is required for basic test setup or else I will have to do a lot of code repeat in many test cases.
1 parent 91b39a1 commit b8627e2

File tree

4 files changed

+34
-23
lines changed

4 files changed

+34
-23
lines changed

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"Inferno\\Foundation\\": "src/"
1414
}
1515
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Inferno\\Foundation\\Tests\\": "tests/"
19+
}
20+
},
1621
"minimum-stability": "dev",
1722
"require": {
1823
"illuminate/support": "~5",

publishable/database/seeders/InfernoUserSeeder.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

test/Browser/LoginPageTest.php renamed to tests/LoginPageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Test\Browser;
3+
namespace Inferno\Foundation\Tests;
44

55
use App\User;
66
use Laravel\Dusk\Browser;

tests/ProfilePageTest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace Inferno\Foundation\Test;
4+
5+
use App\User;
6+
use Laravel\Dusk\Browser;
7+
use Tests\DuskTestCase;
8+
9+
class ProfilePageTest extends DuskTestCase
10+
{
11+
protected $path, $loginBtn;
12+
13+
/**
14+
* Handling the construct
15+
*/
16+
public function __construct()
17+
{
18+
$this->path = '/user/profile';
19+
$this->changePasswordBtn = '#change-password-form .btn-success';
20+
}
21+
22+
public function test_change_password_without_data_validation_error()
23+
{
24+
$this->browse(function (Browser $browser) {
25+
// $browser->visit($this->path)->;
26+
});
27+
}
28+
}

0 commit comments

Comments
 (0)