Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] PHPUnit test fixes #14084

Merged
merged 3 commits into from Feb 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions tests/unit/suites/libraries/cms/router/JRouterSiteTest.php
Expand Up @@ -114,12 +114,13 @@ public function testConstruct()
$app->method('get')->will($this->returnValueMap($config));
$object = new JRouterSite($app, $app->getMenu());
$rules = $object->getRules();
$this->assertTrue(count($rules['parse' . JRouter::PROCESS_BEFORE]) == 3);
$this->assertTrue(count($rules['parse']) == 2);
$this->assertTrue(count($rules['parse' . JRouter::PROCESS_AFTER]) == 1);

$this->assertTrue(count($rules['parse' . JRouter::PROCESS_BEFORE]) == 2);
$this->assertTrue(count($rules['parse']) == 1);
$this->assertTrue(count($rules['parse' . JRouter::PROCESS_AFTER]) == 0);
$this->assertTrue(count($rules['build' . JRouter::PROCESS_BEFORE]) == 2);
$this->assertTrue(count($rules['build']) == 1);
$this->assertTrue(count($rules['build' . JRouter::PROCESS_AFTER]) == 4);
$this->assertTrue(count($rules['build']) == 0);
$this->assertTrue(count($rules['build' . JRouter::PROCESS_AFTER]) == 1);
}

/**
Expand Down
Expand Up @@ -27,7 +27,12 @@ protected function setUp()

$this->saveFactoryState();

JFactory::$application = $this->getMockWeb();
$config = array(
array('offset', 'UTC', 'UTC')
);

JFactory::$application = $this->getMockCmsApp();
JFactory::$application->method('get')->will($this->returnValueMap($config));

$this->object = new JDocumentFeed;
}
Expand Down
Expand Up @@ -36,7 +36,7 @@ public function testConstructorDisallowsNonArrayObjects()
*/
public function testConstructorSetsStreamTransport()
{
$http = new JHttp;
$http = new JMediawikiHttp(array());

$this->assertAttributeInstanceOf('JHttpTransportStream', 'transport', $http);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/suites/libraries/joomla/table/JTableTest.php
Expand Up @@ -204,7 +204,7 @@ public function testAddIncludePath()
$expected = array(
'/dummy/',
'dir/not/exist',
realpath(JPATH_PLATFORM . '/src/Joomla/Cms/Table')
realpath(JPATH_PLATFORM . '/src/Cms/Table')
);

// Add dummy paths
Expand Down