<?php

use App\Category;

class CategoryTest extends TestCase {

  public function testEnforcedAdverts()
  {
    $Category = Category::find($this->__faker->numberBetween(20,40));

    $adverts = $Category->getEnforcedAdverts();

    $this->assertInstanceOf("Illuminate\\Database\\Eloquent\\Collection", $adverts);
  }

  public function testGetSubcategories()
  {
    $Category = Category::find($this->__faker->numberBetween(1,7));

    $this->assertInstanceOf("Illuminate\\Database\\Eloquent\\Collection", $Category->subcategories);
  }

}