Completed
Push — master ( 0ea243...da58d4 )
by Henry
10:25 queued 33s
created

ErrorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 29
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testError() 0 15 1
1
<?php
2
namespace Redaxscript\Tests;
3
4
use Facebook\WebDriver\WebDriverBy;
5
6
/**
7
 * ErrorTest
8
 *
9
 * @since 4.0.0
10
 *
11
 * @package Redaxscript
12
 * @category Tests
13
 * @author Henry Ruhs
14
 */
15
16
class ErrorTest extends TestCaseAbstract
17
{
18
	/**
19
	 * testError
20
	 *
21
	 * @since 4.0.0
22
	 *
23
	 * @param string $url
24
	 * @param string $expect
25
	 *
26
	 * @dataProvider providerAutoloader
27
	 */
28
29
	public function testError(string $url = null, string $expect = null) : void
30
	{
31
		/* setup */
32
33
		$this->_driver->get($url);
34
		$titleElement = $this->_driver->findElement(WebDriverBy::cssSelector('h2.rs-title-content'));
35
36
		/* actual */
37
38
		$actual = $titleElement->getText();
39
40
		/* compare */
41
42
		$this->assertEquals($expect, $actual);
43
	}
44
}
45