Skip to content

Commit 4967a61

Browse files
committed
Move tests to appropriate folders, use namespaces, improve phpdoc
1 parent 518a9e0 commit 4967a61

12 files changed

+80
-50
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
},
2727
"autoload-dev": {
2828
"psr-4": {
29-
"Facebook\\WebDriver\\": "tests/functional"
30-
}
29+
"Facebook\\WebDriver\\": "tests/unit"
30+
},
31+
"classmap": ["tests/functional/"]
3132
}
3233
}

tests/unit/WebDriverButtonReleaseActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverButtonReleaseActionTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverButtonReleaseAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverMouse;
1720

1821
class WebDriverButtonReleaseActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverButtonReleaseAction
21-
*/
22+
/** @var WebDriverButtonReleaseAction */
2223
private $webDriverButtonReleaseAction;
23-
24+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2425
private $webDriverMouse;
26+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2527
private $locationProvider;
2628

2729
public function setUp() {

tests/unit/WebDriverClickActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverClickActionTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverClickAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverMouse;
1720

1821
class WebDriverClickActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverClickAction
21-
*/
22+
/** @var WebDriverClickAction */
2223
private $webDriverClickAction;
23-
24+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2425
private $webDriverMouse;
26+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2527
private $locationProvider;
2628

2729
public function setUp() {

tests/unit/WebDriverClickAndHoldActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverClickAndHoldActionTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverClickAndHoldAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverMouse;
1720

1821
class WebDriverClickAndHoldActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverClickAndHoldAction
21-
*/
22+
/** @var WebDriverClickAndHoldAction */
2223
private $webDriverClickAndHoldAction;
23-
24+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2425
private $webDriverMouse;
26+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2527
private $locationProvider;
2628

2729
public function setUp() {

tests/unit/WebDriverContextClickActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverContextClickActionTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverContextClickAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverMouse;
1720

1821
class WebDriverContextClickActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverContextClickAction
21-
*/
22+
/** @var WebDriverContextClickAction */
2223
private $webDriverContextClickAction;
23-
24+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2425
private $webDriverMouse;
26+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2527
private $locationProvider;
2628

2729
public function setUp() {

tests/unit/WebDriverCoordinatesTest.php renamed to tests/unit/Interactions/Internal/WebDriverCoordinatesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverCoordinates;
16+
namespace Facebook\WebDriver\Interactions\Internal;
1717

1818
class WebDriverCoordinatesTest extends \PHPUnit_Framework_TestCase {
1919
public function testConstruct() {

tests/unit/WebDriverDoubleClickActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverDoubleClickActionTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverDoubleClickAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverMouse;
1720

1821
class WebDriverDoubleClickActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverDoubleClickAction
21-
*/
22+
/** @var WebDriverDoubleClickAction */
2223
private $webDriverDoubleClickAction;
23-
24+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2425
private $webDriverMouse;
26+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2527
private $locationProvider;
2628

2729
public function setUp() {

tests/unit/WebDriverKeyDownActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverKeyDownActionTest.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverKeyDownAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverKeyboard;
20+
use Facebook\WebDriver\WebDriverMouse;
1721

1822
class WebDriverKeyDownActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverKeyDownAction
21-
*/
23+
/** @var WebDriverKeyDownAction */
2224
private $webDriverKeyDownAction;
23-
25+
/** @var WebDriverKeyboard|\PHPUnit_Framework_MockObject_MockObject */
2426
private $webDriverKeyboard;
27+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2528
private $webDriverMouse;
29+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2630
private $locationProvider;
2731

2832
public function setUp() {

tests/unit/WebDriverKeyUpActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverKeyUpActionTest.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverKeyUpAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverKeyboard;
20+
use Facebook\WebDriver\WebDriverMouse;
1721

1822
class WebDriverKeyUpActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverKeyUpAction
21-
*/
23+
/** @var WebDriverKeyUpAction */
2224
private $webDriverKeyUpAction;
23-
25+
/** @var WebDriverKeyboard|\PHPUnit_Framework_MockObject_MockObject */
2426
private $webDriverKeyboard;
27+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2528
private $webDriverMouse;
29+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2630
private $locationProvider;
2731

2832
public function setUp() {

tests/unit/WebDriverMouseMoveActionTest.php renamed to tests/unit/Interactions/Internal/WebDriverMouseMoveActionTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use Facebook\WebDriver\Interactions\Internal\WebDriverMouseMoveAction;
16+
namespace Facebook\WebDriver\Interactions\Internal;
17+
18+
use Facebook\WebDriver\Internal\WebDriverLocatable;
19+
use Facebook\WebDriver\WebDriverMouse;
1720

1821
class WebDriverMouseMoveActionTest extends \PHPUnit_Framework_TestCase {
19-
/**
20-
* @type WebDriverMouseMoveAction
21-
*/
22+
/** @var WebDriverMouseMoveAction */
2223
private $webDriverMouseMoveAction;
23-
24+
/** @var WebDriverMouse|\PHPUnit_Framework_MockObject_MockObject */
2425
private $webDriverMouse;
26+
/** @var WebDriverLocatable|\PHPUnit_Framework_MockObject_MockObject */
2527
private $locationProvider;
2628

2729
public function setUp() {

0 commit comments

Comments
 (0)