Is this supposed to be a test? Where do you create the stores? You know there are different databases used for testing?
Apr 22, 2022
2
Level 5
Laravel Test
Greeting everyone, I am working on an e-commerce project this project contains multi-store accordingly to reach any store you have to call route /store_name and this store name i want to make a test to check that all store pages work fine so i make simple test to do that work
public function store_main_test()
{
$stores = DB::table('stores')->where('activate',1)->pluck('name')->toArray();
foreach( $stores as $store ) {
dump($store );
$single_store = strtolower($store);
$this->get("/$single_store");
$this->assertTrue(true);
}
}
the problem here is that I only get the first store only what I am doing wrong here
Please or to participate in this conversation.