Commit e1351af7 authored by alexpott's avatar alexpott

Issue #2081153 by YesCT, lauriii, rdatar, miraj9093, Enxebre, smiro, alexpott:...

Issue #2081153 by YesCT, lauriii, rdatar, miraj9093, Enxebre, smiro, alexpott: Remove unused local variables from core/tests.
parent f9dc1f1d
...@@ -202,7 +202,7 @@ public function testDateFormat($input, $timezone, $format, $format_date, $expect ...@@ -202,7 +202,7 @@ public function testDateFormat($input, $timezone, $format, $format_date, $expect
* @expectedException \Exception * @expectedException \Exception
*/ */
public function testInvalidDates($input, $timezone, $format, $message) { public function testInvalidDates($input, $timezone, $format, $message) {
$date = DateTimePlus::createFromFormat($format, $input, $timezone); DateTimePlus::createFromFormat($format, $input, $timezone);
} }
/** /**
......
...@@ -99,7 +99,7 @@ public function testValidate() { ...@@ -99,7 +99,7 @@ public function testValidate() {
*/ */
public function testValidateParameterTypes($token, $value) { public function testValidateParameterTypes($token, $value) {
// Ensure that there is a valid token seed on the session. // Ensure that there is a valid token seed on the session.
$ignored_token = $this->generator->get(); $this->generator->get();
// The following check might throw PHP fatals and notices, so we disable // The following check might throw PHP fatals and notices, so we disable
// error assertions. // error assertions.
...@@ -135,7 +135,7 @@ public function providerTestValidateParameterTypes() { ...@@ -135,7 +135,7 @@ public function providerTestValidateParameterTypes() {
*/ */
public function testInvalidParameterTypes($token, $value = '') { public function testInvalidParameterTypes($token, $value = '') {
// Ensure that there is a valid token seed on the session. // Ensure that there is a valid token seed on the session.
$ignored_token = $this->generator->get(); $this->generator->get();
$this->generator->validate($token, $value); $this->generator->validate($token, $value);
} }
......
...@@ -154,18 +154,6 @@ function setUp() { ...@@ -154,18 +154,6 @@ function setUp() {
* @see testRender * @see testRender
*/ */
function providerTestRender() { function providerTestRender() {
// Default for 'browsers' key in CSS asset.
$browsers_default = array('IE' => TRUE, '!IE' => TRUE);
// Defaults for LINK and STYLE elements.
$link_element_defaults = array(
);
$style_element_defaults = array(
'#type' => 'html_tag',
'#tag' => 'style',
);
$create_link_element = function($href, $media = 'all', $browsers = array()) { $create_link_element = function($href, $media = 'all', $browsers = array()) {
return array( return array(
'#type' => 'html_tag', '#type' => 'html_tag',
......
...@@ -38,12 +38,7 @@ function testEmpty() { ...@@ -38,12 +38,7 @@ function testEmpty() {
*/ */
function testEmptyIteration() { function testEmptyIteration() {
$result = new StatementEmpty(); $result = new StatementEmpty();
$this->assertSame(0, iterator_count($result), 'Empty result set should not iterate.');
$count = 0;
foreach ($result as $record) {
$count++;
}
$this->assertSame(0, $count, 'Iterating empty result set should not iterate.');
} }
/** /**
......
...@@ -149,7 +149,7 @@ protected function setUp() { ...@@ -149,7 +149,7 @@ protected function setUp() {
*/ */
protected function setUpEntityManager($definitions = array()) { protected function setUpEntityManager($definitions = array()) {
$class = $this->getMockClass('Drupal\Core\Entity\EntityInterface'); $class = $this->getMockClass('Drupal\Core\Entity\EntityInterface');
foreach ($definitions as $entity_type_id => $entity_type) { foreach ($definitions as $entity_type) {
$entity_type->expects($this->any()) $entity_type->expects($this->any())
->method('getClass') ->method('getClass')
->will($this->returnValue($class)); ->will($this->returnValue($class));
......
...@@ -63,7 +63,6 @@ protected function getLocalTaskManager($module_dirs, $route_name, $route_params) ...@@ -63,7 +63,6 @@ protected function getLocalTaskManager($module_dirs, $route_name, $route_params)
$property->setValue($manager, $controllerResolver); $property->setValue($manager, $controllerResolver);
// todo mock a request with a route. // todo mock a request with a route.
$request = $this->getMock('Symfony\Component\HttpFoundation\Request');
$request_stack = new RequestStack(); $request_stack = new RequestStack();
$property = new \ReflectionProperty('Drupal\Core\Menu\LocalTaskManager', 'requestStack'); $property = new \ReflectionProperty('Drupal\Core\Menu\LocalTaskManager', 'requestStack');
$property->setAccessible(TRUE); $property->setAccessible(TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment