public function testThreadIsRunning() { $thread = new TestThread(); $this->assertTrue($thread->start()); $this->assertTrue($thread->join()); $this->assertTrue((bool) $thread->running); }
public function testThreadIsRunning() { $thread = new TestThread(); $this->assertEquals($thread->start(), true); $this->assertEquals($thread->join(), true); $this->assertEquals($thread->running, true); }
function testJoin() { $thread1 = new TestThread(array('Hallo')); $thread2 = new TestThread(array('Eins', 'Zwei', 'Drei')); $thread1->join(); $this->assertTrue(in_array('Hallo', self::$result)); $this->assertTrue(in_array('Eins', self::$result)); $this->assertFalse(in_array('Zwei', self::$result)); $this->assertFalse(in_array('Drei', self::$result)); }
public static function static_print($text) { $x = new TestThread(); $x->print_ln($text); }