silverstripe-framework/tests/php/Core/Injector/InjectorTest/TestObject.php

34 lines
583 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\Core\Tests\Injector\InjectorTest;
use SilverStripe\Dev\TestOnly;
class TestObject implements TestOnly
{
public $sampleService;
2016-10-14 03:30:05 +02:00
public $methodCalls = array();
2016-10-14 03:30:05 +02:00
public function setSomething($v)
{
$this->sampleService = $v;
}
2016-10-14 03:30:05 +02:00
public function myMethod($arg)
{
$this->methodCalls[] = $arg;
}
2016-10-14 03:30:05 +02:00
public function noArgMethod()
{
$this->methodCalls[] = 'noArgMethod called';
}
2016-10-14 03:30:05 +02:00
protected function protectedMethod()
{
$this->methodCalls[] = 'protectedMethod called';
}
2016-10-14 03:30:05 +02:00
}