Commit 250552d9 authored by sun's avatar sun

by sun: Fixed testbot breaks upon .info file without .module file.

parent 442edace
......@@ -6,6 +6,7 @@ Libraries x.x-x.x, xxxx-xx-xx
Libraries 7.x-1.x, xxxx-xx-xx
-----------------------------
by sun: Fixed testbot breaks upon .info file without .module file.
#542940 by tstoeckler, sun: Add libraries-list command.
#919632 by tstoeckler: Add example library info file for testing purposes.
#719896 by tstoeckler, sun: Documentation clean-up and tests improvement.
......
<?php
// $Id$
// Testbot gets confused and breaks when encountering an .info file without
// .module file. Until the testbot is corrected, we need to resolve this by
// supplying a fake .module file for the example.info library.
......@@ -3,20 +3,24 @@
/**
* @file
* Unit tests for Libraries API.
* Tests for Libraries API.
*/
/**
* Tests basic detection and loading of libraries.
*/
class LibrariesTestCase extends DrupalWebTestCase {
protected $profile = 'testing';
public static function getInfo() {
return array(
'name' => 'Libraries API functionality',
'name' => 'Libraries detection and loading',
'description' => 'Tests detection and loading of libraries.',
'group' => 'Libraries API',
);
}
public function setUp() {
function setUp() {
parent::setUp('libraries', 'libraries_test');
}
......@@ -25,7 +29,7 @@ class LibrariesTestCase extends DrupalWebTestCase {
*
* @todo Better method name(s); split into detection/loading/overloading/etc.
*/
public function testLibraries() {
function testLibraries() {
// Test a library specified with an .info file gets detected.
$library = libraries_info('example');
$expected = array(
......@@ -156,7 +160,7 @@ class LibrariesTestCase extends DrupalWebTestCase {
* tests/example/README.txt for more information on how the loading of the
* files is tested.
*/
private function assertLibraryFiles($name) {
function assertLibraryFiles($name) {
$names = drupal_map_assoc(array('example_1', 'example_2', 'example_3', 'example_4'));
unset($names[$name]);
......
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