openstack-sdk-php/tests/Tests/AutoloaderTest.php
Matt Farina 153e6e8b67 Updated the directory and namespace structure to support
multiple API verstions for each service. This included
updating the directory structure for the tests and moving
the Common files to a Common namespace.

Implements blueprint multiple-api-versions

Change-Id: I9f9dfc4ef8f4172243519772a9af86dd92690fcf
2014-04-29 12:02:47 -04:00

49 lines
1.4 KiB
PHP

<?php
/* ============================================================================
(c) Copyright 2014 Hewlett-Packard Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
============================================================================ */
/**
* Unit tests for the Autoloader.
*/
namespace OpenStack\Tests;
require_once 'src/OpenStack/Autoloader.php';
class AutoloaderTest extends TestCase
{
/**
* Test the BaseDir.
*/
public function testBasedir()
{
$basedir = \OpenStack\Autoloader::$basedir;
$this->assertRegExp('/OpenStack/', $basedir);
}
/**
* Test the autoloader.
*/
public function testAutoloader()
{
\OpenStack\Autoloader::useAutoloader();
// If we can construct a class, we are okay.
$test = new \OpenStack\Common\Exception("TEST");
$this->assertInstanceOf('\OpenStack\Common\Exception', $test);
}
}