node = new Isolator(self::COLUMN, self::VALUE, $subsets); } /** * @test */ public function build() : void { $this->assertInstanceOf(Isolator::class, $this->node); $this->assertInstanceOf(Node::class, $this->node); } /** * @test */ public function split() : void { $dataset = Unlabeled::quick(self::SAMPLES); $node = Isolator::split($dataset); $this->assertInstanceOf(Isolator::class, $node); } /** * @test */ public function column() : void { $this->assertSame(self::COLUMN, $this->node->column()); } /** * @test */ public function value() : void { $this->assertSame(self::VALUE, $this->node->value()); } /** * @test */ public function cleanup() : void { $subsets = $this->node->subsets(); $this->assertIsArray($subsets); $this->assertCount(2, $subsets); $this->node->cleanup(); $this->expectException(RuntimeException::class); $this->node->subsets(); } }