Page MenuHomeDevCentral

ServiceTest.php
No OneTemporary

ServiceTest.php

<?php
namespace Nasqueron\Notifications\Tests\Config\Services;
use Nasqueron\Notifications\Config\Services\Service;
use Nasqueron\Notifications\Tests\TestCase;
class ServiceTest extends TestCase {
/**
* @var \Nasqueron\Notifications\Config\Services\Service
*/
private $serviceWithInstance;
/**
* @var \Nasqueron\Notifications\Config\Services\Service
*/
private $serviceWithoutInstance;
public function setUp () {
$this->serviceWithoutInstance = new Service();
$this->serviceWithInstance = clone $this->serviceWithoutInstance;
$this->serviceWithInstance->instance = "http://www.perdu.com";
}
///
/// Tests for getInstanceName()
///
public function testGetInstanceName () {
$this->assertSame(
"http://www.perdu.com",
$this->serviceWithInstance->getInstanceName()
);
}
public function testGetInstanceNameWhenThereIsNoInstance () {
$this->assertSame(
"ø",
$this->serviceWithoutInstance->getInstanceName()
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Feb 28, 21:39 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2439184
Default Alt Text
ServiceTest.php (1 KB)

Event Timeline