@@ 101-123 (lines=23) @@ | ||
98 | /** |
|
99 | * @return array |
|
100 | */ |
|
101 | public function getNameDataProvider() |
|
102 | { |
|
103 | return [ |
|
104 | 'test unsupported class' => [ |
|
105 | 'format' => '', |
|
106 | 'locale' => null, |
|
107 | 'entity' => new \stdClass(), |
|
108 | 'expected' => false |
|
109 | ], |
|
110 | 'test unsupported format' => [ |
|
111 | 'format' => '', |
|
112 | 'locale' => null, |
|
113 | 'entity' => $this->getEntity(), |
|
114 | 'expected' => false |
|
115 | ], |
|
116 | 'correct data' => [ |
|
117 | 'format' => EntityNameProviderInterface::FULL, |
|
118 | 'locale' => '', |
|
119 | 'entity' => $this->getEntity(), |
|
120 | 'expected' => 'Contact' |
|
121 | ] |
|
122 | ]; |
|
123 | } |
|
124 | ||
125 | /** |
|
126 | * @return array |
@@ 68-90 (lines=23) @@ | ||
65 | /** |
|
66 | * @return array |
|
67 | */ |
|
68 | public function getNameDataProvider() |
|
69 | { |
|
70 | return [ |
|
71 | 'test unsupported class' => [ |
|
72 | 'format' => '', |
|
73 | 'locale' => null, |
|
74 | 'entity' => new \stdClass(), |
|
75 | 'expected' => false |
|
76 | ], |
|
77 | 'test unsupported format' => [ |
|
78 | 'format' => '', |
|
79 | 'locale' => null, |
|
80 | 'entity' => $this->getEntity(), |
|
81 | 'expected' => false |
|
82 | ], |
|
83 | 'correct data' => [ |
|
84 | 'format' => SalesFunnelEntityNameProvider::FULL, |
|
85 | 'locale' => '', |
|
86 | 'entity' => $this->getEntity(), |
|
87 | 'expected' => 'Contact' |
|
88 | ] |
|
89 | ]; |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * @return array |