0
我开始使用phpunit进行测试,所以我对如何动态测试东西存在疑问。我创建了一个表作为动态波纹管使用phpunit动态按钮href测试
这里,形象是我的观点:
<div class="panel-body">
@if(Session::has('success'))
<div class="alert alert-success">{{Session::get('success')}}</div>
@endif
<table class="table">
<th>Unity Name</th>
<th>Phone Number</th>
<th>Actions</th>
<tbody>
@foreach($companies as $company)
<tr>
<td>{{$company->name}}</td>
<td>{{$company->owner_number}}</td>
<td>
<a href="/admin/company/{{$company->id}}" class="btn btn-default fa fa-newspaper-o"></a>
<a href="/admin/company/{{$company->id}}/clients" class="btn btn-default fa fa-users"></a>
<a href="company/{{$company->id}}/edit" class="btn btn-default fa fa-pencil-square-o"></a>
{{Form::open(['method' => 'DELETE', 'url'=>'/admin/company/'.$company->id, 'style' => 'display:inline'])}}
<button type="submit" class="btn btn-default fa fa-trash-o"></button>
{{Form::close()}}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
所以,我怎么能测试href标记,如果我以前没有标签的ID?
请尝试在此处粘贴您的代码,而不是添加它的图像。 – zuazo
对不起,我后来的回复,所以有我的看法,我在我的表生成 –